target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void testExists() throws TIOError, TException { ThriftHBaseServiceHandler handler = createHandler(); byte[] rowName = "testExists".getBytes(); ByteBuffer table = wrap(tableAname); TGet get = new TGet(wrap(rowName)); assertFalse(handler.exists(table, get)); List<TColumnValue> columnValues = new ArrayList<TC... | @Override public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException { Table htable = getTable(table); try { return htable.exists(getFromThrift(get)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException { Table htable = getTable(table); try { return htable.exists(getFromThrift(get)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } } | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException { Table htable = getTable(table); try { return htable.exists(getFromThrift(get)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } ThriftH... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException { Table htable = getTable(table); try { return htable.exists(getFromThrift(get)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } ThriftH... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException { Table htable = getTable(table); try { return htable.exists(getFromThrift(get)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } ThriftH... |
@Test public void testDeleteMultiple() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); ByteBuffer table = wrap(tableAname); byte[] rowName1 = "testDeleteMultiple1".getBytes(); byte[] rowName2 = "testDeleteMultiple2".getBytes(); List<TColumnValue> columnValues = new ArrayList<TColumnValue>(); col... | @Override public List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> deletes) throws TIOError, TException { Table htable = getTable(table); try { htable.delete(deletesFromThrift(deletes)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } return Collections.emptyList(); } | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> deletes) throws TIOError, TException { Table htable = getTable(table); try { htable.delete(deletesFromThrift(deletes)); } catch (IOException e) { throw getTIOError(e); } finally { clo... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> deletes) throws TIOError, TException { Table htable = getTable(table); try { htable.delete(deletesFromThrift(deletes)); } catch (IOException e) { throw getTIOError(e); } finally { clo... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> deletes) throws TIOError, TException { Table htable = getTable(table); try { htable.delete(deletesFromThrift(deletes)); } catch (IOException e) { throw getTIOError(e); } finally { clo... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> deletes) throws TIOError, TException { Table htable = getTable(table); try { htable.delete(deletesFromThrift(deletes)); } catch (IOException e) { throw getTIOError(e); } finally { clo... |
@Test public void testIncrement() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); byte[] rowName = "testIncrement".getBytes(); ByteBuffer table = wrap(tableAname); List<TColumnValue> columnValues = new ArrayList<TColumnValue>(); columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifier... | @Override public TResult increment(ByteBuffer table, TIncrement increment) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.increment(incrementFromThrift(increment))); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult increment(ByteBuffer table, TIncrement increment) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.increment(incrementFromThrift(increment))); } catch (IOException e) { throw getTIOError(... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult increment(ByteBuffer table, TIncrement increment) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.increment(incrementFromThrift(increment))); } catch (IOException e) { throw getTIOError(... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult increment(ByteBuffer table, TIncrement increment) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.increment(incrementFromThrift(increment))); } catch (IOException e) { throw getTIOError(... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult increment(ByteBuffer table, TIncrement increment) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.increment(incrementFromThrift(increment))); } catch (IOException e) { throw getTIOError(... |
@Test public void testAppend() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); byte[] rowName = "testAppend".getBytes(); ByteBuffer table = wrap(tableAname); byte[] v1 = Bytes.toBytes("42"); byte[] v2 = Bytes.toBytes("23"); List<TColumnValue> columnValues = new ArrayList<TColumnValue>(); columnV... | @Override public TResult append(ByteBuffer table, TAppend append) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.append(appendFromThrift(append))); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult append(ByteBuffer table, TAppend append) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.append(appendFromThrift(append))); } catch (IOException e) { throw getTIOError(e); } finally { cl... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult append(ByteBuffer table, TAppend append) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.append(appendFromThrift(append))); } catch (IOException e) { throw getTIOError(e); } finally { cl... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult append(ByteBuffer table, TAppend append) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.append(appendFromThrift(append))); } catch (IOException e) { throw getTIOError(e); } finally { cl... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult append(ByteBuffer table, TAppend append) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.append(appendFromThrift(append))); } catch (IOException e) { throw getTIOError(e); } finally { cl... |
@Test public void testCheckAndPut() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); byte[] rowName = "testCheckAndPut".getBytes(); ByteBuffer table = wrap(tableAname); List<TColumnValue> columnValuesA = new ArrayList<TColumnValue>(); TColumnValue columnValueA = new TColumnValue(wrap(familyAname)... | @Override public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut put) throws TIOError, TException { Table htable = getTable(table); try { return htable.checkAndPut(byteBufferToByteArray(row), byteBufferToByteArray(family), byteBufferToByteArray(quali... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut put) throws TIOError, TException { Table htable = getTable(table); try { return htable.checkAndPut(byteBufferToByteArray(row),... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut put) throws TIOError, TException { Table htable = getTable(table); try { return htable.checkAndPut(byteBufferToByteArray(row),... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut put) throws TIOError, TException { Table htable = getTable(table); try { return htable.checkAndPut(byteBufferToByteArray(row),... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut put) throws TIOError, TException { Table htable = getTable(table); try { return htable.checkAndPut(byteBufferToByteArray(row),... |
@Test public void testCheckAndDelete() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); byte[] rowName = "testCheckAndDelete".getBytes(); ByteBuffer table = wrap(tableAname); List<TColumnValue> columnValuesA = new ArrayList<TColumnValue>(); TColumnValue columnValueA = new TColumnValue(wrap(family... | @Override public boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete deleteSingle) throws TIOError, TException { Table htable = getTable(table); try { if (value == null) { return htable.checkAndDelete(byteBufferToByteArray(row), byteBufferToByteArr... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete deleteSingle) throws TIOError, TException { Table htable = getTable(table); try { if (value == null) { return htable.che... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete deleteSingle) throws TIOError, TException { Table htable = getTable(table); try { if (value == null) { return htable.che... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete deleteSingle) throws TIOError, TException { Table htable = getTable(table); try { if (value == null) { return htable.che... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete deleteSingle) throws TIOError, TException { Table htable = getTable(table); try { if (value == null) { return htable.che... |
@Test (timeout=180000) public void testDupeStartKey() throws Exception { TableName table = TableName.valueOf("tableDupeStartKey"); try { setupTable(table); assertNoErrors(doFsck(conf, false)); assertEquals(ROWKEYS.length, countRows()); HRegionInfo hriDupe = createRegion(tbl.getTableDescriptor(), Bytes.toBytes("A"), Byt... | public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... |
@Test public void testGetScannerResults() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); ByteBuffer table = wrap(tableAname); TColumnValue columnValue = new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname)); List<TColumnValue> columnValues = new ArrayList<TColumnValue>(); ... | @Override public List<TResult> getScannerResults(ByteBuffer table, TScan scan, int numRows) throws TIOError, TException { Table htable = getTable(table); List<TResult> results = null; ResultScanner scanner = null; try { scanner = htable.getScanner(scanFromThrift(scan)); results = resultsFromHBase(scanner.next(numRows))... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public List<TResult> getScannerResults(ByteBuffer table, TScan scan, int numRows) throws TIOError, TException { Table htable = getTable(table); List<TResult> results = null; ResultScanner scanner = null; try { scanner = htable.getScanner(scanFromThrif... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public List<TResult> getScannerResults(ByteBuffer table, TScan scan, int numRows) throws TIOError, TException { Table htable = getTable(table); List<TResult> results = null; ResultScanner scanner = null; try { scanner = htable.getScanner(scanFromThrif... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public List<TResult> getScannerResults(ByteBuffer table, TScan scan, int numRows) throws TIOError, TException { Table htable = getTable(table); List<TResult> results = null; ResultScanner scanner = null; try { scanner = htable.getScanner(scanFromThrif... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public List<TResult> getScannerResults(ByteBuffer table, TScan scan, int numRows) throws TIOError, TException { Table htable = getTable(table); List<TResult> results = null; ResultScanner scanner = null; try { scanner = htable.getScanner(scanFromThrif... |
@Test public void testFilterRegistration() throws Exception { Configuration conf = UTIL.getConfiguration(); conf.set("hbase.thrift.filters", "MyFilter:filterclass"); ThriftServer.registerFilters(conf); Map<String, String> registeredFilters = ParseFilter.getAllFilters(); assertEquals("filterclass", registeredFilters.get... | @Override public TResult get(ByteBuffer table, TGet get) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.get(getFromThrift(get))); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult get(ByteBuffer table, TGet get) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.get(getFromThrift(get))); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); ... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult get(ByteBuffer table, TGet get) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.get(getFromThrift(get))); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); ... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult get(ByteBuffer table, TGet get) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.get(getFromThrift(get))); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); ... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult get(ByteBuffer table, TGet get) throws TIOError, TException { Table htable = getTable(table); try { return resultFromHBase(htable.get(getFromThrift(get))); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); ... |
@Test public void testAttribute() throws Exception { byte[] rowName = "testAttribute".getBytes(); byte[] attributeKey = "attribute1".getBytes(); byte[] attributeValue = "value1".getBytes(); Map<ByteBuffer, ByteBuffer> attributes = new HashMap<ByteBuffer, ByteBuffer>(); attributes.put(wrap(attributeKey), wrap(attributeV... | @Override public void put(ByteBuffer table, TPut put) throws TIOError, TException { Table htable = getTable(table); try { htable.put(putFromThrift(put)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public void put(ByteBuffer table, TPut put) throws TIOError, TException { Table htable = getTable(table); try { htable.put(putFromThrift(put)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } } | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public void put(ByteBuffer table, TPut put) throws TIOError, TException { Table htable = getTable(table); try { htable.put(putFromThrift(put)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } ThriftHBaseServiceHandl... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public void put(ByteBuffer table, TPut put) throws TIOError, TException { Table htable = getTable(table); try { htable.put(putFromThrift(put)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } ThriftHBaseServiceHandl... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public void put(ByteBuffer table, TPut put) throws TIOError, TException { Table htable = getTable(table); try { htable.put(putFromThrift(put)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } ThriftHBaseServiceHandl... |
@Test public void testMutateRow() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); byte[] rowName = "testMutateRow".getBytes(); ByteBuffer table = wrap(tableAname); List<TColumnValue> columnValuesA = new ArrayList<TColumnValue>(); TColumnValue columnValueA = new TColumnValue(wrap(familyAname), wr... | @Override public void mutateRow(ByteBuffer table, TRowMutations rowMutations) throws TIOError, TException { Table htable = getTable(table); try { htable.mutateRow(rowMutationsFromThrift(rowMutations)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public void mutateRow(ByteBuffer table, TRowMutations rowMutations) throws TIOError, TException { Table htable = getTable(table); try { htable.mutateRow(rowMutationsFromThrift(rowMutations)); } catch (IOException e) { throw getTIOError(e); } finally {... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public void mutateRow(ByteBuffer table, TRowMutations rowMutations) throws TIOError, TException { Table htable = getTable(table); try { htable.mutateRow(rowMutationsFromThrift(rowMutations)); } catch (IOException e) { throw getTIOError(e); } finally {... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public void mutateRow(ByteBuffer table, TRowMutations rowMutations) throws TIOError, TException { Table htable = getTable(table); try { htable.mutateRow(rowMutationsFromThrift(rowMutations)); } catch (IOException e) { throw getTIOError(e); } finally {... | ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public void mutateRow(ByteBuffer table, TRowMutations rowMutations) throws TIOError, TException { Table htable = getTable(table); try { htable.mutateRow(rowMutationsFromThrift(rowMutations)); } catch (IOException e) { throw getTIOError(e); } finally {... |
@Test public void testFindException() throws Exception { IOException ioe = new IOException("Tesst"); ServiceException se = new ServiceException(ioe); assertEquals(ioe, ClientExceptionsUtil.findException(se)); } | public static Throwable findException(Object exception) { if (exception == null || !(exception instanceof Throwable)) { return null; } Throwable cur = (Throwable) exception; while (cur != null) { if (isSpecialException(cur)) { return cur; } if (cur instanceof RemoteException) { RemoteException re = (RemoteException) cu... | ClientExceptionsUtil { public static Throwable findException(Object exception) { if (exception == null || !(exception instanceof Throwable)) { return null; } Throwable cur = (Throwable) exception; while (cur != null) { if (isSpecialException(cur)) { return cur; } if (cur instanceof RemoteException) { RemoteException re... | ClientExceptionsUtil { public static Throwable findException(Object exception) { if (exception == null || !(exception instanceof Throwable)) { return null; } Throwable cur = (Throwable) exception; while (cur != null) { if (isSpecialException(cur)) { return cur; } if (cur instanceof RemoteException) { RemoteException re... | ClientExceptionsUtil { public static Throwable findException(Object exception) { if (exception == null || !(exception instanceof Throwable)) { return null; } Throwable cur = (Throwable) exception; while (cur != null) { if (isSpecialException(cur)) { return cur; } if (cur instanceof RemoteException) { RemoteException re... | ClientExceptionsUtil { public static Throwable findException(Object exception) { if (exception == null || !(exception instanceof Throwable)) { return null; } Throwable cur = (Throwable) exception; while (cur != null) { if (isSpecialException(cur)) { return cur; } if (cur instanceof RemoteException) { RemoteException re... |
@Test public void testSimple() { for (int i = 1; i < values.length ; i++) { for (int j = 0; j < i; j++) { LongComparator cp = new LongComparator(values[i]); assertEquals(1, cp.compareTo(Bytes.toBytes(values[j]))); } } } | @Override public int compareTo(byte[] value, int offset, int length) { Long that = Bytes.toLong(value, offset, length); return this.longValue.compareTo(that); } | LongComparator extends ByteArrayComparable { @Override public int compareTo(byte[] value, int offset, int length) { Long that = Bytes.toLong(value, offset, length); return this.longValue.compareTo(that); } } | LongComparator extends ByteArrayComparable { @Override public int compareTo(byte[] value, int offset, int length) { Long that = Bytes.toLong(value, offset, length); return this.longValue.compareTo(that); } LongComparator(long value); } | LongComparator extends ByteArrayComparable { @Override public int compareTo(byte[] value, int offset, int length) { Long that = Bytes.toLong(value, offset, length); return this.longValue.compareTo(that); } LongComparator(long value); @Override int compareTo(byte[] value, int offset, int length); @Override byte [] toByt... | LongComparator extends ByteArrayComparable { @Override public int compareTo(byte[] value, int offset, int length) { Long that = Bytes.toLong(value, offset, length); return this.longValue.compareTo(that); } LongComparator(long value); @Override int compareTo(byte[] value, int offset, int length); @Override byte [] toByt... |
@Test public void testRemoveByServer() { RegionLocations list; list = new RegionLocations(); assertTrue(list == list.removeByServer(sn0)); list = hrll(hrl(info0, sn0)); assertTrue(list == list.removeByServer(sn1)); list = list.removeByServer(sn0); assertEquals(0, list.numNonNullElements()); list = hrll(hrl(info0, sn0),... | public RegionLocations removeByServer(ServerName serverName) { HRegionLocation[] newLocations = null; for (int i = 0; i < locations.length; i++) { if (locations[i] != null && serverName.equals(locations[i].getServerName())) { if (newLocations == null) { newLocations = new HRegionLocation[locations.length]; System.array... | RegionLocations { public RegionLocations removeByServer(ServerName serverName) { HRegionLocation[] newLocations = null; for (int i = 0; i < locations.length; i++) { if (locations[i] != null && serverName.equals(locations[i].getServerName())) { if (newLocations == null) { newLocations = new HRegionLocation[locations.len... | RegionLocations { public RegionLocations removeByServer(ServerName serverName) { HRegionLocation[] newLocations = null; for (int i = 0; i < locations.length; i++) { if (locations[i] != null && serverName.equals(locations[i].getServerName())) { if (newLocations == null) { newLocations = new HRegionLocation[locations.len... | RegionLocations { public RegionLocations removeByServer(ServerName serverName) { HRegionLocation[] newLocations = null; for (int i = 0; i < locations.length; i++) { if (locations[i] != null && serverName.equals(locations[i].getServerName())) { if (newLocations == null) { newLocations = new HRegionLocation[locations.len... | RegionLocations { public RegionLocations removeByServer(ServerName serverName) { HRegionLocation[] newLocations = null; for (int i = 0; i < locations.length; i++) { if (locations[i] != null && serverName.equals(locations[i].getServerName())) { if (newLocations == null) { newLocations = new HRegionLocation[locations.len... |
@Test public void testRemove() { RegionLocations list; list = new RegionLocations(); assertTrue(list == list.remove(hrl(info0, sn0))); list = hrll(hrl(info0, sn0)); assertTrue(list == list.remove(hrl(info0, sn1))); list = list.remove(hrl(info0, sn0)); assertTrue(list.isEmpty()); list = hrll(hrl(info0, sn0), hrl(info1, ... | public RegionLocations remove(HRegionLocation location) { if (location == null) return this; if (location.getRegionInfo() == null) return this; int replicaId = location.getRegionInfo().getReplicaId(); if (replicaId >= locations.length) return this; if (locations[replicaId] == null || !location.getRegionInfo().equals(lo... | RegionLocations { public RegionLocations remove(HRegionLocation location) { if (location == null) return this; if (location.getRegionInfo() == null) return this; int replicaId = location.getRegionInfo().getReplicaId(); if (replicaId >= locations.length) return this; if (locations[replicaId] == null || !location.getRegi... | RegionLocations { public RegionLocations remove(HRegionLocation location) { if (location == null) return this; if (location.getRegionInfo() == null) return this; int replicaId = location.getRegionInfo().getReplicaId(); if (replicaId >= locations.length) return this; if (locations[replicaId] == null || !location.getRegi... | RegionLocations { public RegionLocations remove(HRegionLocation location) { if (location == null) return this; if (location.getRegionInfo() == null) return this; int replicaId = location.getRegionInfo().getReplicaId(); if (replicaId >= locations.length) return this; if (locations[replicaId] == null || !location.getRegi... | RegionLocations { public RegionLocations remove(HRegionLocation location) { if (location == null) return this; if (location.getRegionInfo() == null) return this; int replicaId = location.getRegionInfo().getReplicaId(); if (replicaId >= locations.length) return this; if (locations[replicaId] == null || !location.getRegi... |
@Test public void testUpdateLocation() { RegionLocations list; list = new RegionLocations(); list = list.updateLocation(hrl(info0, sn1), false, false); assertEquals(sn1, list.getRegionLocation(0).getServerName()); list = list.updateLocation(hrl(info9, sn3, 10), false, false); assertEquals(sn3, list.getRegionLocation(9)... | public RegionLocations updateLocation(HRegionLocation location, boolean checkForEquals, boolean force) { assert location != null; int replicaId = location.getRegionInfo().getReplicaId(); HRegionLocation oldLoc = getRegionLocation(location.getRegionInfo().getReplicaId()); HRegionLocation selectedLoc = selectRegionLocati... | RegionLocations { public RegionLocations updateLocation(HRegionLocation location, boolean checkForEquals, boolean force) { assert location != null; int replicaId = location.getRegionInfo().getReplicaId(); HRegionLocation oldLoc = getRegionLocation(location.getRegionInfo().getReplicaId()); HRegionLocation selectedLoc = ... | RegionLocations { public RegionLocations updateLocation(HRegionLocation location, boolean checkForEquals, boolean force) { assert location != null; int replicaId = location.getRegionInfo().getReplicaId(); HRegionLocation oldLoc = getRegionLocation(location.getRegionInfo().getReplicaId()); HRegionLocation selectedLoc = ... | RegionLocations { public RegionLocations updateLocation(HRegionLocation location, boolean checkForEquals, boolean force) { assert location != null; int replicaId = location.getRegionInfo().getReplicaId(); HRegionLocation oldLoc = getRegionLocation(location.getRegionInfo().getReplicaId()); HRegionLocation selectedLoc = ... | RegionLocations { public RegionLocations updateLocation(HRegionLocation location, boolean checkForEquals, boolean force) { assert location != null; int replicaId = location.getRegionInfo().getReplicaId(); HRegionLocation oldLoc = getRegionLocation(location.getRegionInfo().getReplicaId()); HRegionLocation selectedLoc = ... |
@Test public void testHbckWithExcessReplica() throws Exception { TableName table = TableName.valueOf("testHbckWithExcessReplica"); try { setupTableWithRegionReplica(table, 2); TEST_UTIL.getHBaseAdmin().flush(table.getName()); assertNoErrors(doFsck(conf, false)); assertEquals(ROWKEYS.length, countRows()); HTable meta = ... | @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegri... | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegri... |
@Test public void testMergeLocations() { RegionLocations list1, list2; list1 = new RegionLocations(); list2 = new RegionLocations(); assertTrue(list1 == list1.mergeLocations(list2)); list2 = hrll(hrl(info0, sn0)); list1 = list1.mergeLocations(list2); assertEquals(sn0, list1.getRegionLocation(0).getServerName()); list1 ... | public RegionLocations mergeLocations(RegionLocations other) { assert other != null; HRegionLocation[] newLocations = null; int max = other.locations.length; HRegionInfo regionInfo = null; for (int i = 0; i < max; i++) { HRegionLocation thisLoc = this.getRegionLocation(i); HRegionLocation otherLoc = other.getRegionLoca... | RegionLocations { public RegionLocations mergeLocations(RegionLocations other) { assert other != null; HRegionLocation[] newLocations = null; int max = other.locations.length; HRegionInfo regionInfo = null; for (int i = 0; i < max; i++) { HRegionLocation thisLoc = this.getRegionLocation(i); HRegionLocation otherLoc = o... | RegionLocations { public RegionLocations mergeLocations(RegionLocations other) { assert other != null; HRegionLocation[] newLocations = null; int max = other.locations.length; HRegionInfo regionInfo = null; for (int i = 0; i < max; i++) { HRegionLocation thisLoc = this.getRegionLocation(i); HRegionLocation otherLoc = o... | RegionLocations { public RegionLocations mergeLocations(RegionLocations other) { assert other != null; HRegionLocation[] newLocations = null; int max = other.locations.length; HRegionInfo regionInfo = null; for (int i = 0; i < max; i++) { HRegionLocation thisLoc = this.getRegionLocation(i); HRegionLocation otherLoc = o... | RegionLocations { public RegionLocations mergeLocations(RegionLocations other) { assert other != null; HRegionLocation[] newLocations = null; int max = other.locations.length; HRegionInfo regionInfo = null; for (int i = 0; i < max; i++) { HRegionLocation thisLoc = this.getRegionLocation(i); HRegionLocation otherLoc = o... |
@Test public void testBuildCellBlock() throws IOException { doBuildCellBlockUndoCellBlock(this.util, new KeyValueCodec(), null); doBuildCellBlockUndoCellBlock(this.util, new KeyValueCodec(), new DefaultCodec()); doBuildCellBlockUndoCellBlock(this.util, new KeyValueCodec(), new GzipCodec()); } | @SuppressWarnings("resource") public ByteBuffer buildCellBlock(final Codec codec, final CompressionCodec compressor, final CellScanner cellScanner) throws IOException { return buildCellBlock(codec, compressor, cellScanner, null); } | IPCUtil { @SuppressWarnings("resource") public ByteBuffer buildCellBlock(final Codec codec, final CompressionCodec compressor, final CellScanner cellScanner) throws IOException { return buildCellBlock(codec, compressor, cellScanner, null); } } | IPCUtil { @SuppressWarnings("resource") public ByteBuffer buildCellBlock(final Codec codec, final CompressionCodec compressor, final CellScanner cellScanner) throws IOException { return buildCellBlock(codec, compressor, cellScanner, null); } IPCUtil(final Configuration conf); } | IPCUtil { @SuppressWarnings("resource") public ByteBuffer buildCellBlock(final Codec codec, final CompressionCodec compressor, final CellScanner cellScanner) throws IOException { return buildCellBlock(codec, compressor, cellScanner, null); } IPCUtil(final Configuration conf); @SuppressWarnings("resource") ByteBuffer bu... | IPCUtil { @SuppressWarnings("resource") public ByteBuffer buildCellBlock(final Codec codec, final CompressionCodec compressor, final CellScanner cellScanner) throws IOException { return buildCellBlock(codec, compressor, cellScanner, null); } IPCUtil(final Configuration conf); @SuppressWarnings("resource") ByteBuffer bu... |
@Test public void testListOfCellScannerables() throws IOException { List<CellScannable> cells = new ArrayList<CellScannable>(); final int count = 10; for (int i = 0; i < count; i++) { cells.add(createCell(i)); } PayloadCarryingRpcController controller = new PayloadCarryingRpcController(cells); CellScanner cellScanner =... | public CellScanner cellScanner() { return cellScanner; } | PayloadCarryingRpcController extends TimeLimitedRpcController implements CellScannable { public CellScanner cellScanner() { return cellScanner; } } | PayloadCarryingRpcController extends TimeLimitedRpcController implements CellScannable { public CellScanner cellScanner() { return cellScanner; } PayloadCarryingRpcController(); PayloadCarryingRpcController(final CellScanner cellScanner); PayloadCarryingRpcController(final List<CellScannable> cellIterables); } | PayloadCarryingRpcController extends TimeLimitedRpcController implements CellScannable { public CellScanner cellScanner() { return cellScanner; } PayloadCarryingRpcController(); PayloadCarryingRpcController(final CellScanner cellScanner); PayloadCarryingRpcController(final List<CellScannable> cellIterables); CellScan... | PayloadCarryingRpcController extends TimeLimitedRpcController implements CellScannable { public CellScanner cellScanner() { return cellScanner; } PayloadCarryingRpcController(); PayloadCarryingRpcController(final CellScanner cellScanner); PayloadCarryingRpcController(final List<CellScannable> cellIterables); CellScan... |
@Test public void testSubmit() throws Exception { ClusterConnection hc = createHConnection(); AsyncProcess ap = new MyAsyncProcess(hc, conf); List<Put> puts = new ArrayList<Put>(); puts.add(createPut(1, true)); ap.submit(DUMMY_TABLE, puts, false, null, false); Assert.assertTrue(puts.isEmpty()); } | public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } } | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } AsyncProcess(ClusterConnection hc... | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } AsyncProcess(ClusterConnection hc... | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } AsyncProcess(ClusterConnection hc... |
@Test public void testSubmitBusyRegionServer() throws Exception { ClusterConnection hc = createHConnection(); AsyncProcess ap = new MyAsyncProcess(hc, conf); ap.taskCounterPerServer.put(sn2, new AtomicInteger(ap.maxConcurrentTasksPerServer)); List<Put> puts = new ArrayList<Put>(); puts.add(createPut(1, true)); puts.add... | public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } } | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } AsyncProcess(ClusterConnection hc... | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } AsyncProcess(ClusterConnection hc... | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } AsyncProcess(ClusterConnection hc... |
@Test public void testSubmitTrue() throws IOException { final AsyncProcess ap = new MyAsyncProcess(createHConnection(), conf, false); ap.tasksInProgress.incrementAndGet(); final AtomicInteger ai = new AtomicInteger(1); ap.taskCounterPerRegion.put(hri1.getRegionName(), ai); final AtomicBoolean checkPoint = new AtomicBoo... | public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } } | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } AsyncProcess(ClusterConnection hc... | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } AsyncProcess(ClusterConnection hc... | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } AsyncProcess(ClusterConnection hc... |
@Test public void testHTableFailedPutAndNewPut() throws Exception { ClusterConnection conn = createHConnection(); BufferedMutatorImpl mutator = new BufferedMutatorImpl(conn, null, null, new BufferedMutatorParams(DUMMY_TABLE).writeBufferSize(0)); MyAsyncProcess ap = new MyAsyncProcess(conn, conf, true); mutator.ap = ap;... | @VisibleForTesting void waitUntilDone() throws InterruptedIOException { waitForMaximumCurrentTasks(0); } | AsyncProcess { @VisibleForTesting void waitUntilDone() throws InterruptedIOException { waitForMaximumCurrentTasks(0); } } | AsyncProcess { @VisibleForTesting void waitUntilDone() throws InterruptedIOException { waitForMaximumCurrentTasks(0); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCallerFactory rpcCaller, boolean useGlobalErrors, RpcControllerFactory rpcFactory); } | AsyncProcess { @VisibleForTesting void waitUntilDone() throws InterruptedIOException { waitForMaximumCurrentTasks(0); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCallerFactory rpcCaller, boolean useGlobalErrors, RpcControllerFactory rpcFactory); AsyncRequestFuture sub... | AsyncProcess { @VisibleForTesting void waitUntilDone() throws InterruptedIOException { waitForMaximumCurrentTasks(0); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCallerFactory rpcCaller, boolean useGlobalErrors, RpcControllerFactory rpcFactory); AsyncRequestFuture sub... |
@Test public void testErrorsServers() throws IOException { Configuration configuration = new Configuration(conf); ClusterConnection conn = new MyConnectionImpl(configuration); BufferedMutatorImpl mutator = new BufferedMutatorImpl(conn, null, null, new BufferedMutatorParams(DUMMY_TABLE)); configuration.setBoolean(Connec... | protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } | AsyncProcess { protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } } | AsyncProcess { protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCallerFactory rpcCaller, boolean useGloba... | AsyncProcess { protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCallerFactory rpcCaller, boolean useGloba... | AsyncProcess { protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCallerFactory rpcCaller, boolean useGloba... |
@Test public void testGlobalErrors() throws IOException { ClusterConnection conn = new MyConnectionImpl(conf); BufferedMutatorImpl mutator = (BufferedMutatorImpl) conn.getBufferedMutator(DUMMY_TABLE); AsyncProcessWithFailure ap = new AsyncProcessWithFailure(conn, conf, new IOException("test")); mutator.ap = ap; Assert.... | protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } | AsyncProcess { protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } } | AsyncProcess { protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCallerFactory rpcCaller, boolean useGloba... | AsyncProcess { protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCallerFactory rpcCaller, boolean useGloba... | AsyncProcess { protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCallerFactory rpcCaller, boolean useGloba... |
@Test public void testCallQueueTooLarge() throws IOException { ClusterConnection conn = new MyConnectionImpl(conf); BufferedMutatorImpl mutator = (BufferedMutatorImpl) conn.getBufferedMutator(DUMMY_TABLE); AsyncProcessWithFailure ap = new AsyncProcessWithFailure(conn, conf, new CallQueueTooBigException()); mutator.ap =... | protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } | AsyncProcess { protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } } | AsyncProcess { protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCallerFactory rpcCaller, boolean useGloba... | AsyncProcess { protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCallerFactory rpcCaller, boolean useGloba... | AsyncProcess { protected ConnectionManager.ServerErrorTracker createServerErrorTracker() { return new ConnectionManager.ServerErrorTracker( this.serverTrackerTimeout, this.numTries); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCallerFactory rpcCaller, boolean useGloba... |
@Test (timeout=180000) public void testDupeRegion() throws Exception { TableName table = TableName.valueOf("tableDupeRegion"); try { setupTable(table); assertNoErrors(doFsck(conf, false)); assertEquals(ROWKEYS.length, countRows()); HRegionInfo hriDupe = createRegion(tbl.getTableDescriptor(), Bytes.toBytes("A"), Bytes.t... | public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... |
@Test public void testReplicaReplicaSuccess() throws Exception { MyAsyncProcessWithReplicas ap = createReplicaAp(10, 1000, 0); List<Get> rows = makeTimelineGets(DUMMY_BYTES_1, DUMMY_BYTES_2, DUMMY_BYTES_3); AsyncRequestFuture ars = ap.submitAll(DUMMY_TABLE, rows, null, new Object[3]); verifyReplicaResult(ars, RR.TRUE, ... | public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } } | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... |
@Test public void testReplicaPrimarySuccessWoReplicaCalls() throws Exception { MyAsyncProcessWithReplicas ap = createReplicaAp(1000, 10, 0); List<Get> rows = makeTimelineGets(DUMMY_BYTES_1, DUMMY_BYTES_2, DUMMY_BYTES_3); AsyncRequestFuture ars = ap.submitAll(DUMMY_TABLE, rows, null, new Object[3]); verifyReplicaResult(... | public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } } | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... |
@Test public void testReplicaParallelCallsSucceed() throws Exception { MyAsyncProcessWithReplicas ap = createReplicaAp(0, 0, 0); List<Get> rows = makeTimelineGets(DUMMY_BYTES_1, DUMMY_BYTES_2); AsyncRequestFuture ars = ap.submitAll(DUMMY_TABLE, rows, null, new Object[2]); verifyReplicaResult(ars, RR.DONT_CARE, RR.DONT_... | public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } } | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... |
@Test public void testReplicaPartialReplicaCall() throws Exception { MyAsyncProcessWithReplicas ap = createReplicaAp(1000, 0, 0); ap.setPrimaryCallDelay(sn2, 2000); List<Get> rows = makeTimelineGets(DUMMY_BYTES_1, DUMMY_BYTES_2); AsyncRequestFuture ars = ap.submitAll(DUMMY_TABLE, rows, null, new Object[2]); verifyRepli... | public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } } | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... |
@Test public void testReplicaMainFailsBeforeReplicaCalls() throws Exception { MyAsyncProcessWithReplicas ap = createReplicaAp(1000, 0, 0, 1); ap.addFailures(hri1, hri2); List<Get> rows = makeTimelineGets(DUMMY_BYTES_1, DUMMY_BYTES_2); AsyncRequestFuture ars = ap.submitAll(DUMMY_TABLE, rows, null, new Object[2]); verify... | public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } } | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... |
@Test public void testReplicaReplicaSuccessWithParallelFailures() throws Exception { MyAsyncProcessWithReplicas ap = createReplicaAp(0, 1000, 1000, 1); ap.addFailures(hri1, hri1r2, hri2); List<Get> rows = makeTimelineGets(DUMMY_BYTES_1, DUMMY_BYTES_2); AsyncRequestFuture ars = ap.submitAll(DUMMY_TABLE, rows, null, new ... | public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } } | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... |
@Test public void testReplicaAllCallsFailForOneRegion() throws Exception { MyAsyncProcessWithReplicas ap = createReplicaAp(500, 1000, 0, 1); ap.addFailures(hri1, hri1r1, hri1r2, hri2r1); List<Get> rows = makeTimelineGets(DUMMY_BYTES_1, DUMMY_BYTES_2); AsyncRequestFuture ars = ap.submitAll(DUMMY_TABLE, rows, null, new O... | public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } } | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... | AsyncProcess { public <CResult> AsyncRequestFuture submitAll(TableName tableName, List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results) { return submitAll(null, tableName, rows, callback, results); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
RpcRetryingCa... |
@Test public void testUncheckedException() throws Exception { ClusterConnection hc = createHConnection(); MyThreadPoolExecutor myPool = new MyThreadPoolExecutor(1, 20, 60, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(200)); AsyncProcess ap = new AsyncProcessForThrowableCheck(hc, conf, myPool); List<Put> puts = n... | public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } } | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } AsyncProcess(ClusterConnection hc... | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } AsyncProcess(ClusterConnection hc... | AsyncProcess { public <CResult> AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults) throws InterruptedIOException { return submit(null, tableName, rows, atLeastOne, callback, needResults); } AsyncProcess(ClusterConnection hc... |
@Test public void testDynamicFilter() throws Exception { Configuration conf = HBaseConfiguration.create(); String localPath = conf.get("hbase.local.dir") + File.separator + "jars" + File.separator; File jarFile = new File(localPath, "MockFilter.jar"); jarFile.delete(); assertFalse("Should be deleted: " + jarFile.getPat... | public Get(byte [] row) { Mutation.checkRow(row); this.row = row; } | Get extends Query implements Row, Comparable<Row> { public Get(byte [] row) { Mutation.checkRow(row); this.row = row; } } | Get extends Query implements Row, Comparable<Row> { public Get(byte [] row) { Mutation.checkRow(row); this.row = row; } Get(byte [] row); Get(Get get); } | Get extends Query implements Row, Comparable<Row> { public Get(byte [] row) { Mutation.checkRow(row); this.row = row; } Get(byte [] row); Get(Get get); boolean isCheckExistenceOnly(); Get setCheckExistenceOnly(boolean checkExistenceOnly); boolean isClosestRowBefore(); Get setClosestRowBefore(boolean closestRowBefore);... | Get extends Query implements Row, Comparable<Row> { public Get(byte [] row) { Mutation.checkRow(row); this.row = row; } Get(byte [] row); Get(Get get); boolean isCheckExistenceOnly(); Get setCheckExistenceOnly(boolean checkExistenceOnly); boolean isClosestRowBefore(); Get setClosestRowBefore(boolean closestRowBefore);... |
@Test public void testOperationJSON() throws IOException { Scan scan = new Scan(ROW); scan.addColumn(FAMILY, QUALIFIER); String json = scan.toJSON(); Map<String, Object> parsedJSON = mapper.readValue(json, HashMap.class); assertEquals("startRow incorrect in Scan.toJSON()", Bytes.toStringBinary(ROW), parsedJSON.get("sta... | public String toJSON(int maxCols) throws IOException { return JsonMapper.writeMapAsString(toMap(maxCols)); } | Operation { public String toJSON(int maxCols) throws IOException { return JsonMapper.writeMapAsString(toMap(maxCols)); } } | Operation { public String toJSON(int maxCols) throws IOException { return JsonMapper.writeMapAsString(toMap(maxCols)); } } | Operation { public String toJSON(int maxCols) throws IOException { return JsonMapper.writeMapAsString(toMap(maxCols)); } abstract Map<String, Object> getFingerprint(); abstract Map<String, Object> toMap(int maxCols); Map<String, Object> toMap(); String toJSON(int maxCols); String toJSON(); String toString(int maxCols)... | Operation { public String toJSON(int maxCols) throws IOException { return JsonMapper.writeMapAsString(toMap(maxCols)); } abstract Map<String, Object> getFingerprint(); abstract Map<String, Object> toMap(int maxCols); Map<String, Object> toMap(); String toJSON(int maxCols); String toJSON(); String toString(int maxCols)... |
@Test (timeout=180000) public void testDegenerateRegions() throws Exception { TableName table = TableName.valueOf("tableDegenerateRegions"); try { setupTable(table); assertNoErrors(doFsck(conf,false)); assertEquals(ROWKEYS.length, countRows()); HRegionInfo hriDupe = createRegion(tbl.getTableDescriptor(), Bytes.toBytes(... | public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... |
@SuppressWarnings({ "rawtypes", "unchecked" }) @Test public void testDelayingRunner() throws Exception{ MultiAction<Row> ma = new MultiAction<Row>(); ma.add(hri1.getRegionName(), new Action<Row>(new Put(DUMMY_BYTES_1), 0)); final AtomicLong endTime = new AtomicLong(); final long sleepTime = 1000; DelayingRunner runner ... | public DelayingRunner(long sleepTime, Map.Entry<byte[], List<Action<T>>> e) { this.sleepTime = sleepTime; add(e); } | DelayingRunner implements Runnable { public DelayingRunner(long sleepTime, Map.Entry<byte[], List<Action<T>>> e) { this.sleepTime = sleepTime; add(e); } } | DelayingRunner implements Runnable { public DelayingRunner(long sleepTime, Map.Entry<byte[], List<Action<T>>> e) { this.sleepTime = sleepTime; add(e); } DelayingRunner(long sleepTime, Map.Entry<byte[], List<Action<T>>> e); } | DelayingRunner implements Runnable { public DelayingRunner(long sleepTime, Map.Entry<byte[], List<Action<T>>> e) { this.sleepTime = sleepTime; add(e); } DelayingRunner(long sleepTime, Map.Entry<byte[], List<Action<T>>> e); void setRunner(Runnable runner); @Override void run(); void add(Map.Entry<byte[], List<Action<T>>... | DelayingRunner implements Runnable { public DelayingRunner(long sleepTime, Map.Entry<byte[], List<Action<T>>> e) { this.sleepTime = sleepTime; add(e); } DelayingRunner(long sleepTime, Map.Entry<byte[], List<Action<T>>> e); void setRunner(Runnable runner); @Override void run(); void add(Map.Entry<byte[], List<Action<T>>... |
@Test public void testAttributesSerialization() throws IOException { Scan scan = new Scan(); scan.setAttribute("attribute1", Bytes.toBytes("value1")); scan.setAttribute("attribute2", Bytes.toBytes("value2")); scan.setAttribute("attribute3", Bytes.toBytes("value3")); ClientProtos.Scan scanProto = ProtobufUtil.toScan(sca... | @Override public Scan setAttribute(String name, byte[] value) { return (Scan) super.setAttribute(name, value); } | Scan extends Query { @Override public Scan setAttribute(String name, byte[] value) { return (Scan) super.setAttribute(name, value); } } | Scan extends Query { @Override public Scan setAttribute(String name, byte[] value) { return (Scan) super.setAttribute(name, value); } Scan(); Scan(byte [] startRow, Filter filter); Scan(byte [] startRow); Scan(byte [] startRow, byte [] stopRow); Scan(Scan scan); Scan(Get get); } | Scan extends Query { @Override public Scan setAttribute(String name, byte[] value) { return (Scan) super.setAttribute(name, value); } Scan(); Scan(byte [] startRow, Filter filter); Scan(byte [] startRow); Scan(byte [] startRow, byte [] stopRow); Scan(Scan scan); Scan(Get get); boolean isGetScan(); Scan addFamily(b... | Scan extends Query { @Override public Scan setAttribute(String name, byte[] value) { return (Scan) super.setAttribute(name, value); } Scan(); Scan(byte [] startRow, Filter filter); Scan(byte [] startRow); Scan(byte [] startRow, byte [] stopRow); Scan(Scan scan); Scan(Get get); boolean isGetScan(); Scan addFamily(b... |
@Test public void testScanAttributes() { Scan scan = new Scan(); Assert.assertTrue(scan.getAttributesMap().isEmpty()); Assert.assertNull(scan.getAttribute("absent")); scan.setAttribute("absent", null); Assert.assertTrue(scan.getAttributesMap().isEmpty()); Assert.assertNull(scan.getAttribute("absent")); scan.setAttribut... | @Override public Scan setAttribute(String name, byte[] value) { return (Scan) super.setAttribute(name, value); } | Scan extends Query { @Override public Scan setAttribute(String name, byte[] value) { return (Scan) super.setAttribute(name, value); } } | Scan extends Query { @Override public Scan setAttribute(String name, byte[] value) { return (Scan) super.setAttribute(name, value); } Scan(); Scan(byte [] startRow, Filter filter); Scan(byte [] startRow); Scan(byte [] startRow, byte [] stopRow); Scan(Scan scan); Scan(Get get); } | Scan extends Query { @Override public Scan setAttribute(String name, byte[] value) { return (Scan) super.setAttribute(name, value); } Scan(); Scan(byte [] startRow, Filter filter); Scan(byte [] startRow); Scan(byte [] startRow, byte [] stopRow); Scan(Scan scan); Scan(Get get); boolean isGetScan(); Scan addFamily(b... | Scan extends Query { @Override public Scan setAttribute(String name, byte[] value) { return (Scan) super.setAttribute(name, value); } Scan(); Scan(byte [] startRow, Filter filter); Scan(byte [] startRow); Scan(byte [] startRow, byte [] stopRow); Scan(Scan scan); Scan(Get get); boolean isGetScan(); Scan addFamily(b... |
@Test public void testSetAuthorizations() { Scan scan = new Scan(); try { scan.setAuthorizations(new Authorizations("\u002b|\u0029")); scan.setAuthorizations(new Authorizations("A", "B", "0123", "A0", "1A1", "_a")); scan.setAuthorizations(new Authorizations("A|B")); scan.setAuthorizations(new Authorizations("A&B")); sc... | @Override public Scan setAuthorizations(Authorizations authorizations) { return (Scan) super.setAuthorizations(authorizations); } | Scan extends Query { @Override public Scan setAuthorizations(Authorizations authorizations) { return (Scan) super.setAuthorizations(authorizations); } } | Scan extends Query { @Override public Scan setAuthorizations(Authorizations authorizations) { return (Scan) super.setAuthorizations(authorizations); } Scan(); Scan(byte [] startRow, Filter filter); Scan(byte [] startRow); Scan(byte [] startRow, byte [] stopRow); Scan(Scan scan); Scan(Get get); } | Scan extends Query { @Override public Scan setAuthorizations(Authorizations authorizations) { return (Scan) super.setAuthorizations(authorizations); } Scan(); Scan(byte [] startRow, Filter filter); Scan(byte [] startRow); Scan(byte [] startRow, byte [] stopRow); Scan(Scan scan); Scan(Get get); boolean isGetScan();... | Scan extends Query { @Override public Scan setAuthorizations(Authorizations authorizations) { return (Scan) super.setAuthorizations(authorizations); } Scan(); Scan(byte [] startRow, Filter filter); Scan(byte [] startRow); Scan(byte [] startRow, byte [] stopRow); Scan(Scan scan); Scan(Get get); boolean isGetScan();... |
@Test public void testCopyConstructor() { Put origin = new Put(Bytes.toBytes("ROW-01")); byte[] family = Bytes.toBytes("CF-01"); byte[] qualifier = Bytes.toBytes("Q-01"); origin.addColumn(family, qualifier, Bytes.toBytes("V-01")); Put clone = new Put(origin); assertEquals(origin.getCellList(family), clone.getCellList(f... | public Put addColumn(byte [] family, byte [] qualifier, byte [] value) { return addColumn(family, qualifier, this.ts, value); } | Put extends Mutation implements HeapSize, Comparable<Row> { public Put addColumn(byte [] family, byte [] qualifier, byte [] value) { return addColumn(family, qualifier, this.ts, value); } } | Put extends Mutation implements HeapSize, Comparable<Row> { public Put addColumn(byte [] family, byte [] qualifier, byte [] value) { return addColumn(family, qualifier, this.ts, value); } Put(byte [] row); Put(byte[] row, long ts); Put(byte [] rowArray, int rowOffset, int rowLength); Put(ByteBuffer row, long ts); P... | Put extends Mutation implements HeapSize, Comparable<Row> { public Put addColumn(byte [] family, byte [] qualifier, byte [] value) { return addColumn(family, qualifier, this.ts, value); } Put(byte [] row); Put(byte[] row, long ts); Put(byte [] rowArray, int rowOffset, int rowLength); Put(ByteBuffer row, long ts); P... | Put extends Mutation implements HeapSize, Comparable<Row> { public Put addColumn(byte [] family, byte [] qualifier, byte [] value) { return addColumn(family, qualifier, this.ts, value); } Put(byte [] row); Put(byte[] row, long ts); Put(byte [] rowArray, int rowOffset, int rowLength); Put(ByteBuffer row, long ts); P... |
@Test @SuppressWarnings("unchecked") public void testNoResultsHint() throws IOException { final Result[] results = new Result[1]; KeyValue kv1 = new KeyValue("row".getBytes(), "cf".getBytes(), "cq".getBytes(), 1, Type.Maximum); results[0] = Result.create(new Cell[] {kv1}); RpcRetryingCaller<Result[]> caller = Mockito.m... | protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; boolean allResultsSkipped = false; do { allResults... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... |
@Test @SuppressWarnings("unchecked") public void testSizeLimit() throws IOException { final Result[] results = new Result[1]; KeyValue kv1 = new KeyValue("row".getBytes(), "cf".getBytes(), "cq".getBytes(), 1, Type.Maximum); results[0] = Result.create(new Cell[] {kv1}); RpcRetryingCaller<Result[]> caller = Mockito.mock(... | protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; boolean allResultsSkipped = false; do { allResults... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... |
@Test @SuppressWarnings("unchecked") public void testCacheLimit() throws IOException { KeyValue kv1 = new KeyValue("row1".getBytes(), "cf".getBytes(), "cq".getBytes(), 1, Type.Maximum), kv2 = new KeyValue("row2".getBytes(), "cf".getBytes(), "cq".getBytes(), 1, Type.Maximum), kv3 = new KeyValue("row3".getBytes(), "cf".g... | protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; boolean allResultsSkipped = false; do { allResults... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... |
@Test @SuppressWarnings("unchecked") public void testNoMoreResults() throws IOException { final Result[] results = new Result[1]; KeyValue kv1 = new KeyValue("row".getBytes(), "cf".getBytes(), "cq".getBytes(), 1, Type.Maximum); results[0] = Result.create(new Cell[] {kv1}); RpcRetryingCaller<Result[]> caller = Mockito.m... | protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; boolean allResultsSkipped = false; do { allResults... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... |
@Test @SuppressWarnings("unchecked") public void testMoreResults() throws IOException { final Result[] results1 = new Result[1]; KeyValue kv1 = new KeyValue("row".getBytes(), "cf".getBytes(), "cq".getBytes(), 1, Type.Maximum); results1[0] = Result.create(new Cell[] {kv1}); final Result[] results2 = new Result[1]; KeyVa... | protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; boolean allResultsSkipped = false; do { allResults... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... | ClientScanner extends AbstractClientScanner { protected void loadCache() throws IOException { Result[] values = null; long remainingResultSize = maxScannerResultSize; int countdown = this.caching; callable.setCaching(this.caching); boolean retryAfterOutOfOrderException = true; boolean serverHasMoreResults = false; bool... |
@Test (timeout=180000) public void testContainedRegionOverlap() throws Exception { TableName table = TableName.valueOf("tableContainedRegionOverlap"); try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); HRegionInfo hriOverlap = createRegion(tbl.getTableDescriptor(), Bytes.toBytes("A2"), Bytes.toBytes("B... | public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... |
@Test (timeout = 30000) public void testExceptionsFromReplicasArePropagated() throws IOException { scan.setConsistency(Consistency.TIMELINE); rpcFactory = new MockRpcRetryingCallerFactory(conf); conf.set(RpcRetryingCallerFactory.CUSTOM_CALLER_CONF_KEY, MockRpcRetryingCallerFactory.class.getName()); when(clusterConn.loc... | @Override public Result next() throws IOException { if (cache.size() == 0 && this.closed) { return null; } if (cache.size() == 0) { loadCache(); } if (cache.size() > 0) { return cache.poll(); } writeScanMetrics(); return null; } | ClientScanner extends AbstractClientScanner { @Override public Result next() throws IOException { if (cache.size() == 0 && this.closed) { return null; } if (cache.size() == 0) { loadCache(); } if (cache.size() > 0) { return cache.poll(); } writeScanMetrics(); return null; } } | ClientScanner extends AbstractClientScanner { @Override public Result next() throws IOException { if (cache.size() == 0 && this.closed) { return null; } if (cache.size() == 0) { loadCache(); } if (cache.size() > 0) { return cache.poll(); } writeScanMetrics(); return null; } ClientScanner(final Configuration conf, final... | ClientScanner extends AbstractClientScanner { @Override public Result next() throws IOException { if (cache.size() == 0 && this.closed) { return null; } if (cache.size() == 0) { loadCache(); } if (cache.size() > 0) { return cache.poll(); } writeScanMetrics(); return null; } ClientScanner(final Configuration conf, final... | ClientScanner extends AbstractClientScanner { @Override public Result next() throws IOException { if (cache.size() == 0 && this.closed) { return null; } if (cache.size() == 0) { loadCache(); } if (cache.size() > 0) { return cache.poll(); } writeScanMetrics(); return null; } ClientScanner(final Configuration conf, final... |
@Test public void testCreateACL() throws ZooKeeperConnectionException, IOException { Configuration conf = HBaseConfiguration.create(); conf.set(Superusers.SUPERUSER_CONF_KEY, "user1,@group1,user2,@group2,user3"); String node = "/hbase/testCreateACL"; ZooKeeperWatcher watcher = new ZooKeeperWatcher(conf, node, null, fal... | private static ArrayList<ACL> createACL(ZooKeeperWatcher zkw, String node) { return createACL(zkw, node, isSecureZooKeeper(zkw.getConfiguration())); } | ZKUtil { private static ArrayList<ACL> createACL(ZooKeeperWatcher zkw, String node) { return createACL(zkw, node, isSecureZooKeeper(zkw.getConfiguration())); } } | ZKUtil { private static ArrayList<ACL> createACL(ZooKeeperWatcher zkw, String node) { return createACL(zkw, node, isSecureZooKeeper(zkw.getConfiguration())); } } | ZKUtil { private static ArrayList<ACL> createACL(ZooKeeperWatcher zkw, String node) { return createACL(zkw, node, isSecureZooKeeper(zkw.getConfiguration())); } static RecoverableZooKeeper connect(Configuration conf, Watcher watcher); static RecoverableZooKeeper connect(Configuration conf, String ensemble,
Watche... | ZKUtil { private static ArrayList<ACL> createACL(ZooKeeperWatcher zkw, String node) { return createACL(zkw, node, isSecureZooKeeper(zkw.getConfiguration())); } static RecoverableZooKeeper connect(Configuration conf, Watcher watcher); static RecoverableZooKeeper connect(Configuration conf, String ensemble,
Watche... |
@Test public void testIsClientReadable() throws ZooKeeperConnectionException, IOException { ZooKeeperWatcher watcher = new ZooKeeperWatcher(HBaseConfiguration.create(), "testIsClientReadable", null, false); assertTrue(watcher.isClientReadable(watcher.baseZNode)); assertTrue(watcher.isClientReadable(watcher.getZNodeForR... | public boolean isClientReadable(String node) { return node.equals(baseZNode) || isAnyMetaReplicaZnode(node) || node.equals(getMasterAddressZNode()) || node.equals(clusterIdZNode)|| node.equals(rsZNode) || node.equals(tableZNode) || node.startsWith(tableZNode + "/"); } | ZooKeeperWatcher implements Watcher, Abortable, Closeable { public boolean isClientReadable(String node) { return node.equals(baseZNode) || isAnyMetaReplicaZnode(node) || node.equals(getMasterAddressZNode()) || node.equals(clusterIdZNode)|| node.equals(rsZNode) || node.equals(tableZNode) || node.startsWith(tableZNode +... | ZooKeeperWatcher implements Watcher, Abortable, Closeable { public boolean isClientReadable(String node) { return node.equals(baseZNode) || isAnyMetaReplicaZnode(node) || node.equals(getMasterAddressZNode()) || node.equals(clusterIdZNode)|| node.equals(rsZNode) || node.equals(tableZNode) || node.startsWith(tableZNode +... | ZooKeeperWatcher implements Watcher, Abortable, Closeable { public boolean isClientReadable(String node) { return node.equals(baseZNode) || isAnyMetaReplicaZnode(node) || node.equals(getMasterAddressZNode()) || node.equals(clusterIdZNode)|| node.equals(rsZNode) || node.equals(tableZNode) || node.startsWith(tableZNode +... | ZooKeeperWatcher implements Watcher, Abortable, Closeable { public boolean isClientReadable(String node) { return node.equals(baseZNode) || isAnyMetaReplicaZnode(node) || node.equals(getMasterAddressZNode()) || node.equals(clusterIdZNode)|| node.equals(rsZNode) || node.equals(tableZNode) || node.startsWith(tableZNode +... |
@Test (expected=IOException.class) public void testAddCoprocessorTwice() throws IOException { HTableDescriptor htd = new HTableDescriptor(TableName.META_TABLE_NAME); String cpName = "a.b.c.d"; htd.addCoprocessor(cpName); htd.addCoprocessor(cpName); } | public HTableDescriptor addCoprocessor(String className) throws IOException { addCoprocessor(className, null, Coprocessor.PRIORITY_USER, null); return this; } | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor addCoprocessor(String className) throws IOException { addCoprocessor(className, null, Coprocessor.PRIORITY_USER, null); return this; } } | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor addCoprocessor(String className) throws IOException { addCoprocessor(className, null, Coprocessor.PRIORITY_USER, null); return this; } @InterfaceAudience.Private protected HTableDescriptor(final TableName name, HColumnDescriptor... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor addCoprocessor(String className) throws IOException { addCoprocessor(className, null, Coprocessor.PRIORITY_USER, null); return this; } @InterfaceAudience.Private protected HTableDescriptor(final TableName name, HColumnDescriptor... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor addCoprocessor(String className) throws IOException { addCoprocessor(className, null, Coprocessor.PRIORITY_USER, null); return this; } @InterfaceAudience.Private protected HTableDescriptor(final TableName name, HColumnDescriptor... |
@Test public void testAddCoprocessorWithSpecStr() throws IOException { HTableDescriptor htd = new HTableDescriptor(TableName.META_TABLE_NAME); String cpName = "a.b.c.d"; boolean expected = false; try { htd.addCoprocessorWithSpec(cpName); } catch (IllegalArgumentException iae) { expected = true; } if (!expected) fail();... | public HTableDescriptor addCoprocessorWithSpec(final String specStr) throws IOException { String className = getCoprocessorClassNameFromSpecStr(specStr); if (className == null) { throw new IllegalArgumentException("Format does not match " + HConstants.CP_HTD_ATTR_VALUE_PATTERN + ": " + specStr); } checkHasCoprocessor(c... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor addCoprocessorWithSpec(final String specStr) throws IOException { String className = getCoprocessorClassNameFromSpecStr(specStr); if (className == null) { throw new IllegalArgumentException("Format does not match " + HConstants.C... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor addCoprocessorWithSpec(final String specStr) throws IOException { String className = getCoprocessorClassNameFromSpecStr(specStr); if (className == null) { throw new IllegalArgumentException("Format does not match " + HConstants.C... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor addCoprocessorWithSpec(final String specStr) throws IOException { String className = getCoprocessorClassNameFromSpecStr(specStr); if (className == null) { throw new IllegalArgumentException("Format does not match " + HConstants.C... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor addCoprocessorWithSpec(final String specStr) throws IOException { String className = getCoprocessorClassNameFromSpecStr(specStr); if (className == null) { throw new IllegalArgumentException("Format does not match " + HConstants.C... |
@Test public void testLegalHTableNamesRegex() { for (String tn : legalTableNames) { TableName tName = TableName.valueOf(tn); assertTrue("Testing: '" + tn + "'", Pattern.matches(TableName.VALID_USER_TABLE_REGEX, tName.getNameAsString())); } } | public String getNameAsString() { return name.getNameAsString(); } | HTableDescriptor implements WritableComparable<HTableDescriptor> { public String getNameAsString() { return name.getNameAsString(); } } | HTableDescriptor implements WritableComparable<HTableDescriptor> { public String getNameAsString() { return name.getNameAsString(); } @InterfaceAudience.Private protected HTableDescriptor(final TableName name, HColumnDescriptor[] families); protected HTableDescriptor(final TableName name, HColumnDescriptor[] families... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public String getNameAsString() { return name.getNameAsString(); } @InterfaceAudience.Private protected HTableDescriptor(final TableName name, HColumnDescriptor[] families); protected HTableDescriptor(final TableName name, HColumnDescriptor[] families... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public String getNameAsString() { return name.getNameAsString(); } @InterfaceAudience.Private protected HTableDescriptor(final TableName name, HColumnDescriptor[] families); protected HTableDescriptor(final TableName name, HColumnDescriptor[] families... |
@Test public void testGetMaxFileSize() { HTableDescriptor desc = new HTableDescriptor(TableName.valueOf("table")); assertEquals(-1, desc.getMaxFileSize()); desc.setMaxFileSize(1111L); assertEquals(1111L, desc.getMaxFileSize()); } | public long getMaxFileSize() { byte [] value = getValue(MAX_FILESIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; } | HTableDescriptor implements WritableComparable<HTableDescriptor> { public long getMaxFileSize() { byte [] value = getValue(MAX_FILESIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; } } | HTableDescriptor implements WritableComparable<HTableDescriptor> { public long getMaxFileSize() { byte [] value = getValue(MAX_FILESIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; } @InterfaceAudience.Private protected HTableDescriptor(final TableName name, HColumnDescriptor[]... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public long getMaxFileSize() { byte [] value = getValue(MAX_FILESIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; } @InterfaceAudience.Private protected HTableDescriptor(final TableName name, HColumnDescriptor[]... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public long getMaxFileSize() { byte [] value = getValue(MAX_FILESIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; } @InterfaceAudience.Private protected HTableDescriptor(final TableName name, HColumnDescriptor[]... |
@Test public void testGetMemStoreFlushSize() { HTableDescriptor desc = new HTableDescriptor(TableName.valueOf("table")); assertEquals(-1, desc.getMemStoreFlushSize()); desc.setMemStoreFlushSize(1111L); assertEquals(1111L, desc.getMemStoreFlushSize()); } | public long getMemStoreFlushSize() { byte [] value = getValue(MEMSTORE_FLUSHSIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; } | HTableDescriptor implements WritableComparable<HTableDescriptor> { public long getMemStoreFlushSize() { byte [] value = getValue(MEMSTORE_FLUSHSIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; } } | HTableDescriptor implements WritableComparable<HTableDescriptor> { public long getMemStoreFlushSize() { byte [] value = getValue(MEMSTORE_FLUSHSIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; } @InterfaceAudience.Private protected HTableDescriptor(final TableName name, HColumn... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public long getMemStoreFlushSize() { byte [] value = getValue(MEMSTORE_FLUSHSIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; } @InterfaceAudience.Private protected HTableDescriptor(final TableName name, HColumn... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public long getMemStoreFlushSize() { byte [] value = getValue(MEMSTORE_FLUSHSIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; } @InterfaceAudience.Private protected HTableDescriptor(final TableName name, HColumn... |
@Test public void testModifyFamily() { HTableDescriptor htd = new HTableDescriptor(TableName.valueOf("table")); byte[] familyName = Bytes.toBytes("cf"); HColumnDescriptor hcd = new HColumnDescriptor(familyName); hcd.setBlocksize(1000); hcd.setDFSReplication((short) 3); htd.addFamily(hcd); assertEquals(1000, htd.getFami... | public HTableDescriptor modifyFamily(final HColumnDescriptor family) { if (family.getName() == null || family.getName().length <= 0) { throw new IllegalArgumentException("Family name cannot be null or empty"); } if (!hasFamily(family.getName())) { throw new IllegalArgumentException("Column family '" + family.getNameAsS... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor modifyFamily(final HColumnDescriptor family) { if (family.getName() == null || family.getName().length <= 0) { throw new IllegalArgumentException("Family name cannot be null or empty"); } if (!hasFamily(family.getName())) { throw... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor modifyFamily(final HColumnDescriptor family) { if (family.getName() == null || family.getName().length <= 0) { throw new IllegalArgumentException("Family name cannot be null or empty"); } if (!hasFamily(family.getName())) { throw... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor modifyFamily(final HColumnDescriptor family) { if (family.getName() == null || family.getName().length <= 0) { throw new IllegalArgumentException("Family name cannot be null or empty"); } if (!hasFamily(family.getName())) { throw... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor modifyFamily(final HColumnDescriptor family) { if (family.getName() == null || family.getName().length <= 0) { throw new IllegalArgumentException("Family name cannot be null or empty"); } if (!hasFamily(family.getName())) { throw... |
@Test(expected=IllegalArgumentException.class) public void testModifyInexistentFamily() { HTableDescriptor htd = new HTableDescriptor(TableName.valueOf("table")); byte[] familyName = Bytes.toBytes("cf"); HColumnDescriptor hcd = new HColumnDescriptor(familyName); htd.modifyFamily(hcd); } | public HTableDescriptor modifyFamily(final HColumnDescriptor family) { if (family.getName() == null || family.getName().length <= 0) { throw new IllegalArgumentException("Family name cannot be null or empty"); } if (!hasFamily(family.getName())) { throw new IllegalArgumentException("Column family '" + family.getNameAsS... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor modifyFamily(final HColumnDescriptor family) { if (family.getName() == null || family.getName().length <= 0) { throw new IllegalArgumentException("Family name cannot be null or empty"); } if (!hasFamily(family.getName())) { throw... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor modifyFamily(final HColumnDescriptor family) { if (family.getName() == null || family.getName().length <= 0) { throw new IllegalArgumentException("Family name cannot be null or empty"); } if (!hasFamily(family.getName())) { throw... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor modifyFamily(final HColumnDescriptor family) { if (family.getName() == null || family.getName().length <= 0) { throw new IllegalArgumentException("Family name cannot be null or empty"); } if (!hasFamily(family.getName())) { throw... | HTableDescriptor implements WritableComparable<HTableDescriptor> { public HTableDescriptor modifyFamily(final HColumnDescriptor family) { if (family.getName() == null || family.getName().length <= 0) { throw new IllegalArgumentException("Family name cannot be null or empty"); } if (!hasFamily(family.getName())) { throw... |
@Test (timeout=180000) public void testOverlapAndOrphan() throws Exception { TableName table = TableName.valueOf("tableOverlapAndOrphan"); try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); admin.disableTable(table); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("A"), Bytes.toBytes("B"), t... | public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... |
@Test (timeout=180000) public void testCoveredStartKey() throws Exception { TableName table = TableName.valueOf("tableCoveredStartKey"); try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); HRegionInfo hriOverlap = createRegion(tbl.getTableDescriptor(), Bytes.toBytes("A2"), Bytes.toBytes("B2")); TEST_UTI... | public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... |
@Test public void testNamespaceListXMLandJSON() throws IOException, JAXBException { String namespacePath = "/namespaces/"; NamespacesModel model; Response response; Admin admin = TEST_UTIL.getHBaseAdmin(); assertFalse(doesNamespaceExist(admin, NAMESPACE1)); model = testNamespacesModel.buildTestModel(); testNamespacesMo... | @GET @Produces({MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON, MIMETYPE_PROTOBUF, MIMETYPE_PROTOBUF_IETF}) public Response get(final @Context ServletContext context, final @Context UriInfo uriInfo) { if (LOG.isDebugEnabled()) { LOG.debug("GET " + uriInfo.getAbsolutePath()); } servlet.getMetrics().incrementRequests(1); try... | NamespacesResource extends ResourceBase { @GET @Produces({MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON, MIMETYPE_PROTOBUF, MIMETYPE_PROTOBUF_IETF}) public Response get(final @Context ServletContext context, final @Context UriInfo uriInfo) { if (LOG.isDebugEnabled()) { LOG.debug("GET " + uriInfo.getAbsolutePath()); } serv... | NamespacesResource extends ResourceBase { @GET @Produces({MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON, MIMETYPE_PROTOBUF, MIMETYPE_PROTOBUF_IETF}) public Response get(final @Context ServletContext context, final @Context UriInfo uriInfo) { if (LOG.isDebugEnabled()) { LOG.debug("GET " + uriInfo.getAbsolutePath()); } serv... | NamespacesResource extends ResourceBase { @GET @Produces({MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON, MIMETYPE_PROTOBUF, MIMETYPE_PROTOBUF_IETF}) public Response get(final @Context ServletContext context, final @Context UriInfo uriInfo) { if (LOG.isDebugEnabled()) { LOG.debug("GET " + uriInfo.getAbsolutePath()); } serv... | NamespacesResource extends ResourceBase { @GET @Produces({MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON, MIMETYPE_PROTOBUF, MIMETYPE_PROTOBUF_IETF}) public Response get(final @Context ServletContext context, final @Context UriInfo uriInfo) { if (LOG.isDebugEnabled()) { LOG.debug("GET " + uriInfo.getAbsolutePath()); } serv... |
@Test public void testNamespaceListPBandDefault() throws IOException, JAXBException { String schemaPath = "/namespaces/"; NamespacesModel model; Response response; Admin admin = TEST_UTIL.getHBaseAdmin(); assertFalse(doesNamespaceExist(admin, NAMESPACE1)); model = testNamespacesModel.buildTestModel(); testNamespacesMod... | @GET @Produces({MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON, MIMETYPE_PROTOBUF, MIMETYPE_PROTOBUF_IETF}) public Response get(final @Context ServletContext context, final @Context UriInfo uriInfo) { if (LOG.isDebugEnabled()) { LOG.debug("GET " + uriInfo.getAbsolutePath()); } servlet.getMetrics().incrementRequests(1); try... | NamespacesResource extends ResourceBase { @GET @Produces({MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON, MIMETYPE_PROTOBUF, MIMETYPE_PROTOBUF_IETF}) public Response get(final @Context ServletContext context, final @Context UriInfo uriInfo) { if (LOG.isDebugEnabled()) { LOG.debug("GET " + uriInfo.getAbsolutePath()); } serv... | NamespacesResource extends ResourceBase { @GET @Produces({MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON, MIMETYPE_PROTOBUF, MIMETYPE_PROTOBUF_IETF}) public Response get(final @Context ServletContext context, final @Context UriInfo uriInfo) { if (LOG.isDebugEnabled()) { LOG.debug("GET " + uriInfo.getAbsolutePath()); } serv... | NamespacesResource extends ResourceBase { @GET @Produces({MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON, MIMETYPE_PROTOBUF, MIMETYPE_PROTOBUF_IETF}) public Response get(final @Context ServletContext context, final @Context UriInfo uriInfo) { if (LOG.isDebugEnabled()) { LOG.debug("GET " + uriInfo.getAbsolutePath()); } serv... | NamespacesResource extends ResourceBase { @GET @Produces({MIMETYPE_TEXT, MIMETYPE_XML, MIMETYPE_JSON, MIMETYPE_PROTOBUF, MIMETYPE_PROTOBUF_IETF}) public Response get(final @Context ServletContext context, final @Context UriInfo uriInfo) { if (LOG.isDebugEnabled()) { LOG.debug("GET " + uriInfo.getAbsolutePath()); } serv... |
@Test (timeout=180000) public void testRegionHole() throws Exception { TableName table = TableName.valueOf("tableRegionHole"); try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); admin.disableTable(table); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("B"), Bytes.toBytes("C"), true, true, t... | public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... |
@Test (timeout=180000) public void testHDFSRegioninfoMissing() throws Exception { TableName table = TableName.valueOf("tableHDFSRegioninfoMissing"); try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); admin.disableTable(table); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("B"), Bytes.toByt... | public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... |
@Test (timeout=180000) public void testNotInMetaOrDeployedHole() throws Exception { TableName table = TableName.valueOf("tableNotInMetaOrDeployedHole"); try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); admin.disableTable(table); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("B"), Bytes.t... | public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... |
@Test (timeout=180000) public void testNotInMetaHole() throws Exception { TableName table = TableName.valueOf("tableNotInMetaHole"); try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); admin.disableTable(table); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("B"), Bytes.toBytes("C"), false, ... | public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... |
@Test (timeout=180000) public void testNotInHdfs() throws Exception { TableName table = TableName.valueOf("tableNotInHdfs"); try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); admin.flush(table); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("B"), Bytes.toBytes("C"), false, false, true); H... | public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... |
@Test (timeout=180000) public void testNotInHdfsWithReplicas() throws Exception { TableName table = TableName.valueOf("tableNotInHdfs"); HBaseAdmin admin = new HBaseAdmin(conf); try { HRegionInfo[] oldHris = new HRegionInfo[2]; setupTableWithRegionReplica(table, 2); assertEquals(ROWKEYS.length, countRows()); NavigableM... | @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegri... | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegri... |
@Test (timeout=180000) public void testNoHdfsTable() throws Exception { TableName table = TableName.valueOf("NoHdfsTable"); setupTable(table); assertEquals(ROWKEYS.length, countRows()); admin.flush(table); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(""), Bytes.toBytes("A"), false, false, true); deleteReg... | public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... | HBaseFsck extends Configured implements Closeable { public Multimap<byte[], HbckInfo> getOverlapGroups( TableName table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair... |
@Test(timeout=75000) public void testSplitDaughtersNotInMeta() throws Exception { TableName table = TableName.valueOf("testSplitdaughtersNotInMeta"); Table meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService); try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); admin.flush(table);... | @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegri... | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegri... |
@Test(timeout=180000) public void testQuarantineMissingHFile() throws Exception { TableName table = TableName.valueOf(name.getMethodName()); final FileSystem fs = FileSystem.get(conf); HBaseFsck hbck = new HBaseFsck(conf, hbfsckExecutorService) { @Override public HFileCorruptionChecker createHFileCorruptionChecker(bool... | @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegri... | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegri... |
@Ignore @Test(timeout=180000) public void testQuarantineMissingFamdir() throws Exception { TableName table = TableName.valueOf(name.getMethodName()); final FileSystem fs = FileSystem.get(conf); HBaseFsck hbck = new HBaseFsck(conf, hbfsckExecutorService) { @Override public HFileCorruptionChecker createHFileCorruptionChe... | @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegri... | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegri... |
@Test(timeout=180000) public void testQuarantineMissingRegionDir() throws Exception { TableName table = TableName.valueOf(name.getMethodName()); final FileSystem fs = FileSystem.get(conf); HBaseFsck hbck = new HBaseFsck(conf, hbfsckExecutorService) { @Override public HFileCorruptionChecker createHFileCorruptionChecker(... | @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegri... | HBaseFsck extends Configured implements Closeable { @Override public void close() throws IOException { IOUtils.closeQuietly(admin); IOUtils.closeQuietly(meta); IOUtils.closeQuietly(connection); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegri... |
@Test public void testOrphanedTableZNode() throws Exception { TableName table = TableName.valueOf("testOrphanedZKTableEntry"); try { TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager().getTableStateManager() .setTableState(table, ZooKeeperProtos.Table.State.ENABLING); try { setupTable(table); Assert.fail( "C... | public ErrorReporter getErrors() { return errors; } | HBaseFsck extends Configured implements Closeable { public ErrorReporter getErrors() { return errors; } } | HBaseFsck extends Configured implements Closeable { public ErrorReporter getErrors() { return errors; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { public ErrorReporter getErrors() { return errors; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair(); int onlineConsistencyRepair(); int onlineHbck(); static byte[] keyOnly(byte[] b)... | HBaseFsck extends Configured implements Closeable { public ErrorReporter getErrors() { return errors; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair(); int onlineConsistencyRepair(); int onlineHbck(); static byte[] keyOnly(byte[] b)... |
@Test (timeout=180000) public void testMetaOffline() throws Exception { HBaseFsck hbck = doFsck(conf, false); assertNoErrors(hbck); deleteMetaRegion(conf, true, false, false); hbck = doFsck(conf, false); assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.NO_META_REGION, ERROR_CODE.UNKNOWN }); hbck = doFsck(conf, true); a... | private void deleteMetaRegion(HbckInfo hi) throws IOException { deleteMetaRegion(hi.metaEntry.getRegionName()); } | HBaseFsck extends Configured implements Closeable { private void deleteMetaRegion(HbckInfo hi) throws IOException { deleteMetaRegion(hi.metaEntry.getRegionName()); } } | HBaseFsck extends Configured implements Closeable { private void deleteMetaRegion(HbckInfo hi) throws IOException { deleteMetaRegion(hi.metaEntry.getRegionName()); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); } | HBaseFsck extends Configured implements Closeable { private void deleteMetaRegion(HbckInfo hi) throws IOException { deleteMetaRegion(hi.metaEntry.getRegionName()); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair(); int onlineConsiste... | HBaseFsck extends Configured implements Closeable { private void deleteMetaRegion(HbckInfo hi) throws IOException { deleteMetaRegion(hi.metaEntry.getRegionName()); } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair(); int onlineConsiste... |
@Test (timeout = 180000) public void testRegionBoundariesCheck() throws Exception { HBaseFsck hbck = doFsck(conf, false); assertNoErrors(hbck); try { hbck.checkRegionBoundaries(); } catch (IllegalArgumentException e) { if (e.getMessage().endsWith("not a valid DFS filename.")) { fail("Table directory path is not valid."... | public void checkRegionBoundaries() { try { ByteArrayComparator comparator = new ByteArrayComparator(); List<HRegionInfo> regions = MetaScanner.listAllRegions(getConf(), connection, false); final RegionBoundariesInformation currentRegionBoundariesInformation = new RegionBoundariesInformation(); Path hbaseRoot = FSUtils... | HBaseFsck extends Configured implements Closeable { public void checkRegionBoundaries() { try { ByteArrayComparator comparator = new ByteArrayComparator(); List<HRegionInfo> regions = MetaScanner.listAllRegions(getConf(), connection, false); final RegionBoundariesInformation currentRegionBoundariesInformation = new Reg... | HBaseFsck extends Configured implements Closeable { public void checkRegionBoundaries() { try { ByteArrayComparator comparator = new ByteArrayComparator(); List<HRegionInfo> regions = MetaScanner.listAllRegions(getConf(), connection, false); final RegionBoundariesInformation currentRegionBoundariesInformation = new Reg... | HBaseFsck extends Configured implements Closeable { public void checkRegionBoundaries() { try { ByteArrayComparator comparator = new ByteArrayComparator(); List<HRegionInfo> regions = MetaScanner.listAllRegions(getConf(), connection, false); final RegionBoundariesInformation currentRegionBoundariesInformation = new Reg... | HBaseFsck extends Configured implements Closeable { public void checkRegionBoundaries() { try { ByteArrayComparator comparator = new ByteArrayComparator(); List<HRegionInfo> regions = MetaScanner.listAllRegions(getConf(), connection, false); final RegionBoundariesInformation currentRegionBoundariesInformation = new Reg... |
@Test(timeout = 60000) public void testMultipleClients() throws Exception { ExecutorService exec = Executors.newFixedThreadPool(NUM_THREADS); try { ExecutorCompletionService<Boolean> ecs = new ExecutorCompletionService<Boolean>(exec); for (int i = 0; i < NUM_THREADS; ++i) ecs.submit(new IdLockTestThread("client_" + i))... | @VisibleForTesting int purgeAndGetEntryPoolSize() { gc(); Threads.sleep(200); lockPool.purge(); return lockPool.size(); } | IdReadWriteLock { @VisibleForTesting int purgeAndGetEntryPoolSize() { gc(); Threads.sleep(200); lockPool.purge(); return lockPool.size(); } } | IdReadWriteLock { @VisibleForTesting int purgeAndGetEntryPoolSize() { gc(); Threads.sleep(200); lockPool.purge(); return lockPool.size(); } } | IdReadWriteLock { @VisibleForTesting int purgeAndGetEntryPoolSize() { gc(); Threads.sleep(200); lockPool.purge(); return lockPool.size(); } ReentrantReadWriteLock getLock(long id); @VisibleForTesting void waitForWaiters(long id, int numWaiters); } | IdReadWriteLock { @VisibleForTesting int purgeAndGetEntryPoolSize() { gc(); Threads.sleep(200); lockPool.purge(); return lockPool.size(); } ReentrantReadWriteLock getLock(long id); @VisibleForTesting void waitForWaiters(long id, int numWaiters); } |
@Test public void testConnectionChore() throws Exception { UTIL.startMiniCluster(); ConnectionCache cache = new ConnectionCache(UTIL.getConfiguration(), UserProvider.instantiate(UTIL.getConfiguration()), 1000, 5000); ConnectionCache.ConnectionInfo info = cache.getCurrentConnection(); assertEquals(false, info.connection... | ConnectionInfo getCurrentConnection() throws IOException { String userName = getEffectiveUser(); ConnectionInfo connInfo = connections.get(userName); if (connInfo == null || !connInfo.updateAccessTime()) { Lock lock = locker.acquireLock(userName); try { connInfo = connections.get(userName); if (connInfo == null) { User... | ConnectionCache { ConnectionInfo getCurrentConnection() throws IOException { String userName = getEffectiveUser(); ConnectionInfo connInfo = connections.get(userName); if (connInfo == null || !connInfo.updateAccessTime()) { Lock lock = locker.acquireLock(userName); try { connInfo = connections.get(userName); if (connIn... | ConnectionCache { ConnectionInfo getCurrentConnection() throws IOException { String userName = getEffectiveUser(); ConnectionInfo connInfo = connections.get(userName); if (connInfo == null || !connInfo.updateAccessTime()) { Lock lock = locker.acquireLock(userName); try { connInfo = connections.get(userName); if (connIn... | ConnectionCache { ConnectionInfo getCurrentConnection() throws IOException { String userName = getEffectiveUser(); ConnectionInfo connInfo = connections.get(userName); if (connInfo == null || !connInfo.updateAccessTime()) { Lock lock = locker.acquireLock(userName); try { connInfo = connections.get(userName); if (connIn... | ConnectionCache { ConnectionInfo getCurrentConnection() throws IOException { String userName = getEffectiveUser(); ConnectionInfo connInfo = connections.get(userName); if (connInfo == null || !connInfo.updateAccessTime()) { Lock lock = locker.acquireLock(userName); try { connInfo = connections.get(userName); if (connIn... |
@Test public void testLargeRegion() throws Exception { RegionLocator regionLocator = mockRegionLocator("largeRegion"); Admin admin = mockAdmin( mockServer( mockRegion("largeRegion", Integer.MAX_VALUE) ) ); RegionSizeCalculator calculator = new RegionSizeCalculator(regionLocator, admin); assertEquals(((long) Integer.MAX... | public long getRegionSize(byte[] regionId) { Long size = sizeMap.get(regionId); if (size == null) { LOG.debug("Unknown region:" + Arrays.toString(regionId)); return 0; } else { return size; } } | RegionSizeCalculator { public long getRegionSize(byte[] regionId) { Long size = sizeMap.get(regionId); if (size == null) { LOG.debug("Unknown region:" + Arrays.toString(regionId)); return 0; } else { return size; } } } | RegionSizeCalculator { public long getRegionSize(byte[] regionId) { Long size = sizeMap.get(regionId); if (size == null) { LOG.debug("Unknown region:" + Arrays.toString(regionId)); return 0; } else { return size; } } @Deprecated RegionSizeCalculator(HTable table); RegionSizeCalculator(RegionLocator regionLocator, Adm... | RegionSizeCalculator { public long getRegionSize(byte[] regionId) { Long size = sizeMap.get(regionId); if (size == null) { LOG.debug("Unknown region:" + Arrays.toString(regionId)); return 0; } else { return size; } } @Deprecated RegionSizeCalculator(HTable table); RegionSizeCalculator(RegionLocator regionLocator, Adm... | RegionSizeCalculator { public long getRegionSize(byte[] regionId) { Long size = sizeMap.get(regionId); if (size == null) { LOG.debug("Unknown region:" + Arrays.toString(regionId)); return 0; } else { return size; } } @Deprecated RegionSizeCalculator(HTable table); RegionSizeCalculator(RegionLocator regionLocator, Adm... |
@Test public void testVisitStoreFiles() throws IOException { final Set<String> regions = new HashSet<String>(); final Set<String> families = new HashSet<String>(); final Set<String> hfiles = new HashSet<String>(); FSVisitor.visitTableStoreFiles(fs, tableDir, new FSVisitor.StoreFileVisitor() { public void storeFile(fina... | public static void visitTableStoreFiles(final FileSystem fs, final Path tableDir, final StoreFileVisitor visitor) throws IOException { FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs)); if (regions == null) { if (LOG.isTraceEnabled()) { LOG.trace("No regions under directory:" + ta... | FSVisitor { public static void visitTableStoreFiles(final FileSystem fs, final Path tableDir, final StoreFileVisitor visitor) throws IOException { FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs)); if (regions == null) { if (LOG.isTraceEnabled()) { LOG.trace("No regions under dire... | FSVisitor { public static void visitTableStoreFiles(final FileSystem fs, final Path tableDir, final StoreFileVisitor visitor) throws IOException { FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs)); if (regions == null) { if (LOG.isTraceEnabled()) { LOG.trace("No regions under dire... | FSVisitor { public static void visitTableStoreFiles(final FileSystem fs, final Path tableDir, final StoreFileVisitor visitor) throws IOException { FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs)); if (regions == null) { if (LOG.isTraceEnabled()) { LOG.trace("No regions under dire... | FSVisitor { public static void visitTableStoreFiles(final FileSystem fs, final Path tableDir, final StoreFileVisitor visitor) throws IOException { FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs)); if (regions == null) { if (LOG.isTraceEnabled()) { LOG.trace("No regions under dire... |
@Test public void testVisitRecoveredEdits() throws IOException { final Set<String> regions = new HashSet<String>(); final Set<String> edits = new HashSet<String>(); FSVisitor.visitTableRecoveredEdits(fs, tableDir, new FSVisitor.RecoveredEditsVisitor() { public void recoveredEdits (final String region, final String logf... | public static void visitTableRecoveredEdits(final FileSystem fs, final Path tableDir, final FSVisitor.RecoveredEditsVisitor visitor) throws IOException { FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs)); if (regions == null) { if (LOG.isTraceEnabled()) { LOG.trace("No recoveredEd... | FSVisitor { public static void visitTableRecoveredEdits(final FileSystem fs, final Path tableDir, final FSVisitor.RecoveredEditsVisitor visitor) throws IOException { FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs)); if (regions == null) { if (LOG.isTraceEnabled()) { LOG.trace("No... | FSVisitor { public static void visitTableRecoveredEdits(final FileSystem fs, final Path tableDir, final FSVisitor.RecoveredEditsVisitor visitor) throws IOException { FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs)); if (regions == null) { if (LOG.isTraceEnabled()) { LOG.trace("No... | FSVisitor { public static void visitTableRecoveredEdits(final FileSystem fs, final Path tableDir, final FSVisitor.RecoveredEditsVisitor visitor) throws IOException { FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs)); if (regions == null) { if (LOG.isTraceEnabled()) { LOG.trace("No... | FSVisitor { public static void visitTableRecoveredEdits(final FileSystem fs, final Path tableDir, final FSVisitor.RecoveredEditsVisitor visitor) throws IOException { FileStatus[] regions = FSUtils.listStatus(fs, tableDir, new FSUtils.RegionDirFilter(fs)); if (regions == null) { if (LOG.isTraceEnabled()) { LOG.trace("No... |
@Test public void testVisitLogFiles() throws IOException { final Set<String> servers = new HashSet<String>(); final Set<String> logs = new HashSet<String>(); FSVisitor.visitLogFiles(fs, rootDir, new FSVisitor.LogFileVisitor() { public void logFile (final String server, final String logfile) throws IOException { servers... | public static void visitLogFiles(final FileSystem fs, final Path rootDir, final LogFileVisitor visitor) throws IOException { Path logsDir = new Path(rootDir, HConstants.HREGION_LOGDIR_NAME); FileStatus[] logServerDirs = FSUtils.listStatus(fs, logsDir); if (logServerDirs == null) { if (LOG.isTraceEnabled()) { LOG.trace(... | FSVisitor { public static void visitLogFiles(final FileSystem fs, final Path rootDir, final LogFileVisitor visitor) throws IOException { Path logsDir = new Path(rootDir, HConstants.HREGION_LOGDIR_NAME); FileStatus[] logServerDirs = FSUtils.listStatus(fs, logsDir); if (logServerDirs == null) { if (LOG.isTraceEnabled()) ... | FSVisitor { public static void visitLogFiles(final FileSystem fs, final Path rootDir, final LogFileVisitor visitor) throws IOException { Path logsDir = new Path(rootDir, HConstants.HREGION_LOGDIR_NAME); FileStatus[] logServerDirs = FSUtils.listStatus(fs, logsDir); if (logServerDirs == null) { if (LOG.isTraceEnabled()) ... | FSVisitor { public static void visitLogFiles(final FileSystem fs, final Path rootDir, final LogFileVisitor visitor) throws IOException { Path logsDir = new Path(rootDir, HConstants.HREGION_LOGDIR_NAME); FileStatus[] logServerDirs = FSUtils.listStatus(fs, logsDir); if (logServerDirs == null) { if (LOG.isTraceEnabled()) ... | FSVisitor { public static void visitLogFiles(final FileSystem fs, final Path rootDir, final LogFileVisitor visitor) throws IOException { Path logsDir = new Path(rootDir, HConstants.HREGION_LOGDIR_NAME); FileStatus[] logServerDirs = FSUtils.listStatus(fs, logsDir); if (logServerDirs == null) { if (LOG.isTraceEnabled()) ... |
@Test public void testIsHDFS() throws Exception { HBaseTestingUtility htu = new HBaseTestingUtility(); htu.getConfiguration().setBoolean("dfs.support.append", false); assertFalse(FSUtils.isHDFS(htu.getConfiguration())); htu.getConfiguration().setBoolean("dfs.support.append", true); MiniDFSCluster cluster = null; try { ... | public static boolean isHDFS(final Configuration conf) throws IOException { FileSystem fs = FileSystem.get(conf); String scheme = fs.getUri().getScheme(); return scheme.equalsIgnoreCase("hdfs"); } | FSUtils { public static boolean isHDFS(final Configuration conf) throws IOException { FileSystem fs = FileSystem.get(conf); String scheme = fs.getUri().getScheme(); return scheme.equalsIgnoreCase("hdfs"); } } | FSUtils { public static boolean isHDFS(final Configuration conf) throws IOException { FileSystem fs = FileSystem.get(conf); String scheme = fs.getUri().getScheme(); return scheme.equalsIgnoreCase("hdfs"); } protected FSUtils(); } | FSUtils { public static boolean isHDFS(final Configuration conf) throws IOException { FileSystem fs = FileSystem.get(conf); String scheme = fs.getUri().getScheme(); return scheme.equalsIgnoreCase("hdfs"); } protected FSUtils(); static void setStoragePolicy(final FileSystem fs, final Configuration conf,
final Pat... | FSUtils { public static boolean isHDFS(final Configuration conf) throws IOException { FileSystem fs = FileSystem.get(conf); String scheme = fs.getUri().getScheme(); return scheme.equalsIgnoreCase("hdfs"); } protected FSUtils(); static void setStoragePolicy(final FileSystem fs, final Configuration conf,
final Pat... |
@Test public void testcomputeHDFSBlocksDistribution() throws Exception { HBaseTestingUtility htu = new HBaseTestingUtility(); final int DEFAULT_BLOCK_SIZE = 1024; htu.getConfiguration().setLong("dfs.blocksize", DEFAULT_BLOCK_SIZE); MiniDFSCluster cluster = null; Path testFile = null; try { String hosts[] = new String[]... | static public HDFSBlocksDistribution computeHDFSBlocksDistribution( final FileSystem fs, FileStatus status, long start, long length) throws IOException { HDFSBlocksDistribution blocksDistribution = new HDFSBlocksDistribution(); BlockLocation [] blockLocations = fs.getFileBlockLocations(status, start, length); for(Block... | FSUtils { static public HDFSBlocksDistribution computeHDFSBlocksDistribution( final FileSystem fs, FileStatus status, long start, long length) throws IOException { HDFSBlocksDistribution blocksDistribution = new HDFSBlocksDistribution(); BlockLocation [] blockLocations = fs.getFileBlockLocations(status, start, length);... | FSUtils { static public HDFSBlocksDistribution computeHDFSBlocksDistribution( final FileSystem fs, FileStatus status, long start, long length) throws IOException { HDFSBlocksDistribution blocksDistribution = new HDFSBlocksDistribution(); BlockLocation [] blockLocations = fs.getFileBlockLocations(status, start, length);... | FSUtils { static public HDFSBlocksDistribution computeHDFSBlocksDistribution( final FileSystem fs, FileStatus status, long start, long length) throws IOException { HDFSBlocksDistribution blocksDistribution = new HDFSBlocksDistribution(); BlockLocation [] blockLocations = fs.getFileBlockLocations(status, start, length);... | FSUtils { static public HDFSBlocksDistribution computeHDFSBlocksDistribution( final FileSystem fs, FileStatus status, long start, long length) throws IOException { HDFSBlocksDistribution blocksDistribution = new HDFSBlocksDistribution(); BlockLocation [] blockLocations = fs.getFileBlockLocations(status, start, length);... |
@Test public void testRenameAndSetModifyTime() throws Exception { HBaseTestingUtility htu = new HBaseTestingUtility(); Configuration conf = htu.getConfiguration(); MiniDFSCluster cluster = htu.startMiniDFSCluster(1); assertTrue(FSUtils.isHDFS(conf)); FileSystem fs = FileSystem.get(conf); Path testDir = htu.getDataTestD... | public static boolean renameAndSetModifyTime(final FileSystem fs, final Path src, final Path dest) throws IOException { fs.setTimes(src, EnvironmentEdgeManager.currentTime(), -1); return fs.rename(src, dest); } | FSUtils { public static boolean renameAndSetModifyTime(final FileSystem fs, final Path src, final Path dest) throws IOException { fs.setTimes(src, EnvironmentEdgeManager.currentTime(), -1); return fs.rename(src, dest); } } | FSUtils { public static boolean renameAndSetModifyTime(final FileSystem fs, final Path src, final Path dest) throws IOException { fs.setTimes(src, EnvironmentEdgeManager.currentTime(), -1); return fs.rename(src, dest); } protected FSUtils(); } | FSUtils { public static boolean renameAndSetModifyTime(final FileSystem fs, final Path src, final Path dest) throws IOException { fs.setTimes(src, EnvironmentEdgeManager.currentTime(), -1); return fs.rename(src, dest); } protected FSUtils(); static void setStoragePolicy(final FileSystem fs, final Configuration conf,
... | FSUtils { public static boolean renameAndSetModifyTime(final FileSystem fs, final Path src, final Path dest) throws IOException { fs.setTimes(src, EnvironmentEdgeManager.currentTime(), -1); return fs.rename(src, dest); } protected FSUtils(); static void setStoragePolicy(final FileSystem fs, final Configuration conf,
... |
@Test public void testEquals() { Path p1 = new Path("/p1"); Path p2 = new Path("/p2"); Path p3 = new Path("/p3"); assertEquals(new FileLink(), new FileLink()); assertEquals(new FileLink(p1), new FileLink(p1)); assertEquals(new FileLink(p1, p2), new FileLink(p1, p2)); assertEquals(new FileLink(p1, p2, p3), new FileLink(... | @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (this.getClass().equals(obj.getClass())) { return Arrays.equals(this.locations, ((FileLink) obj).locations); } return false; } | FileLink { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (this.getClass().equals(obj.getClass())) { return Arrays.equals(this.locations, ((FileLink) obj).locations); } return false; } } | FileLink { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (this.getClass().equals(obj.getClass())) { return Arrays.equals(this.locations, ((FileLink) obj).locations); } return false; } protected FileLink(); FileLink(Path originPath, Path... alternativePaths); FileLink(final Colle... | FileLink { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (this.getClass().equals(obj.getClass())) { return Arrays.equals(this.locations, ((FileLink) obj).locations); } return false; } protected FileLink(); FileLink(Path originPath, Path... alternativePaths); FileLink(final Colle... | FileLink { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (this.getClass().equals(obj.getClass())) { return Arrays.equals(this.locations, ((FileLink) obj).locations); } return false; } protected FileLink(); FileLink(Path originPath, Path... alternativePaths); FileLink(final Colle... |
@Test public void testHashCode() { Path p1 = new Path("/p1"); Path p2 = new Path("/p2"); Path p3 = new Path("/p3"); assertEquals(new FileLink().hashCode(), new FileLink().hashCode()); assertEquals(new FileLink(p1).hashCode(), new FileLink(p1).hashCode()); assertEquals(new FileLink(p1, p2).hashCode(), new FileLink(p1, p... | @Override public int hashCode() { return Arrays.hashCode(locations); } | FileLink { @Override public int hashCode() { return Arrays.hashCode(locations); } } | FileLink { @Override public int hashCode() { return Arrays.hashCode(locations); } protected FileLink(); FileLink(Path originPath, Path... alternativePaths); FileLink(final Collection<Path> locations); } | FileLink { @Override public int hashCode() { return Arrays.hashCode(locations); } protected FileLink(); FileLink(Path originPath, Path... alternativePaths); FileLink(final Collection<Path> locations); Path[] getLocations(); @Override String toString(); boolean exists(final FileSystem fs); Path getAvailablePath(FileS... | FileLink { @Override public int hashCode() { return Arrays.hashCode(locations); } protected FileLink(); FileLink(Path originPath, Path... alternativePaths); FileLink(final Collection<Path> locations); Path[] getLocations(); @Override String toString(); boolean exists(final FileSystem fs); Path getAvailablePath(FileS... |
@Test public void testHDFSLinkReadDuringDelete() throws Exception { HBaseTestingUtility testUtil = new HBaseTestingUtility(); Configuration conf = testUtil.getConfiguration(); conf.setInt("dfs.blocksize", 1024 * 1024); conf.setInt("dfs.client.read.prefetch.size", 2 * 1024 * 1024); testUtil.startMiniDFSCluster(1); MiniD... | public FSDataInputStream open(final FileSystem fs) throws IOException { return new FSDataInputStream(new FileLinkInputStream(fs, this)); } | FileLink { public FSDataInputStream open(final FileSystem fs) throws IOException { return new FSDataInputStream(new FileLinkInputStream(fs, this)); } } | FileLink { public FSDataInputStream open(final FileSystem fs) throws IOException { return new FSDataInputStream(new FileLinkInputStream(fs, this)); } protected FileLink(); FileLink(Path originPath, Path... alternativePaths); FileLink(final Collection<Path> locations); } | FileLink { public FSDataInputStream open(final FileSystem fs) throws IOException { return new FSDataInputStream(new FileLinkInputStream(fs, this)); } protected FileLink(); FileLink(Path originPath, Path... alternativePaths); FileLink(final Collection<Path> locations); Path[] getLocations(); @Override String toString... | FileLink { public FSDataInputStream open(final FileSystem fs) throws IOException { return new FSDataInputStream(new FileLinkInputStream(fs, this)); } protected FileLink(); FileLink(Path originPath, Path... alternativePaths); FileLink(final Collection<Path> locations); Path[] getLocations(); @Override String toString... |
@Test public void testEquality() { assertEquals(block.hashCode(), blockEqual.hashCode()); assertNotEquals(block.hashCode(), blockNotEqual.hashCode()); assertEquals(block, blockEqual); assertNotEquals(block, blockNotEqual); } | @Override public int hashCode() { return (int)(accessTime ^ (accessTime >>> 32)); } | LruCachedBlock implements HeapSize, Comparable<LruCachedBlock> { @Override public int hashCode() { return (int)(accessTime ^ (accessTime >>> 32)); } } | LruCachedBlock implements HeapSize, Comparable<LruCachedBlock> { @Override public int hashCode() { return (int)(accessTime ^ (accessTime >>> 32)); } LruCachedBlock(BlockCacheKey cacheKey, Cacheable buf, long accessTime); LruCachedBlock(BlockCacheKey cacheKey, Cacheable buf, long accessTime,
boolean inMemory); } | LruCachedBlock implements HeapSize, Comparable<LruCachedBlock> { @Override public int hashCode() { return (int)(accessTime ^ (accessTime >>> 32)); } LruCachedBlock(BlockCacheKey cacheKey, Cacheable buf, long accessTime); LruCachedBlock(BlockCacheKey cacheKey, Cacheable buf, long accessTime,
boolean inMemory); vo... | LruCachedBlock implements HeapSize, Comparable<LruCachedBlock> { @Override public int hashCode() { return (int)(accessTime ^ (accessTime >>> 32)); } LruCachedBlock(BlockCacheKey cacheKey, Cacheable buf, long accessTime); LruCachedBlock(BlockCacheKey cacheKey, Cacheable buf, long accessTime,
boolean inMemory); vo... |
@Test public void testBucketAllocator() throws BucketAllocatorException { BucketAllocator mAllocator = cache.getAllocator(); final List<Integer> BLOCKSIZES = Arrays.asList(4 * 1024, 8 * 1024, 64 * 1024, 96 * 1024); boolean full = false; ArrayList<Long> allocations = new ArrayList<Long>(); List<Integer> tmp = new ArrayL... | public BucketAllocator getAllocator() { return this.bucketAllocator; } | BucketCache implements BlockCache, HeapSize { public BucketAllocator getAllocator() { return this.bucketAllocator; } } | BucketCache implements BlockCache, HeapSize { public BucketAllocator getAllocator() { return this.bucketAllocator; } BucketCache(String ioEngineName, long capacity, int blockSize, int[] bucketSizes,
int writerThreadNum, int writerQLen, String persistencePath); BucketCache(String ioEngineName, long capacity, int ... | BucketCache implements BlockCache, HeapSize { public BucketAllocator getAllocator() { return this.bucketAllocator; } BucketCache(String ioEngineName, long capacity, int blockSize, int[] bucketSizes,
int writerThreadNum, int writerQLen, String persistencePath); BucketCache(String ioEngineName, long capacity, int ... | BucketCache implements BlockCache, HeapSize { public BucketAllocator getAllocator() { return this.bucketAllocator; } BucketCache(String ioEngineName, long capacity, int blockSize, int[] bucketSizes,
int writerThreadNum, int writerQLen, String persistencePath); BucketCache(String ioEngineName, long capacity, int ... |
@Test public void testHeapSizeChanges() throws Exception { cache.stopWriterThreads(); CacheTestUtils.testHeapSizeChanges(cache, BLOCK_SIZE); } | void stopWriterThreads() throws InterruptedException { for (WriterThread writerThread : writerThreads) { writerThread.disableWriter(); writerThread.interrupt(); writerThread.join(); } } | BucketCache implements BlockCache, HeapSize { void stopWriterThreads() throws InterruptedException { for (WriterThread writerThread : writerThreads) { writerThread.disableWriter(); writerThread.interrupt(); writerThread.join(); } } } | BucketCache implements BlockCache, HeapSize { void stopWriterThreads() throws InterruptedException { for (WriterThread writerThread : writerThreads) { writerThread.disableWriter(); writerThread.interrupt(); writerThread.join(); } } BucketCache(String ioEngineName, long capacity, int blockSize, int[] bucketSizes,
... | BucketCache implements BlockCache, HeapSize { void stopWriterThreads() throws InterruptedException { for (WriterThread writerThread : writerThreads) { writerThread.disableWriter(); writerThread.interrupt(); writerThread.join(); } } BucketCache(String ioEngineName, long capacity, int blockSize, int[] bucketSizes,
... | BucketCache implements BlockCache, HeapSize { void stopWriterThreads() throws InterruptedException { for (WriterThread writerThread : writerThreads) { writerThread.disableWriter(); writerThread.interrupt(); writerThread.join(); } } BucketCache(String ioEngineName, long capacity, int blockSize, int[] bucketSizes,
... |
@Test public void testParsingWritableReference() throws IOException { final String datafile = System.getProperty("test.build.classes", "target/test-classes") + File.separator + "a6a6562b777440fd9c34885428f5cb61.21e75333ada3d5bafb34bb918f29576c"; FileSystem fs = FileSystem.get(HTU.getConfiguration()); Reference.read(fs,... | public static Reference read(final FileSystem fs, final Path p) throws IOException { InputStream in = fs.open(p); try { in = in.markSupported()? in: new BufferedInputStream(in); int pblen = ProtobufUtil.lengthOfPBMagic(); in.mark(pblen); byte [] pbuf = new byte[pblen]; int read = in.read(pbuf); if (read != pblen) throw... | Reference { public static Reference read(final FileSystem fs, final Path p) throws IOException { InputStream in = fs.open(p); try { in = in.markSupported()? in: new BufferedInputStream(in); int pblen = ProtobufUtil.lengthOfPBMagic(); in.mark(pblen); byte [] pbuf = new byte[pblen]; int read = in.read(pbuf); if (read != ... | Reference { public static Reference read(final FileSystem fs, final Path p) throws IOException { InputStream in = fs.open(p); try { in = in.markSupported()? in: new BufferedInputStream(in); int pblen = ProtobufUtil.lengthOfPBMagic(); in.mark(pblen); byte [] pbuf = new byte[pblen]; int read = in.read(pbuf); if (read != ... | Reference { public static Reference read(final FileSystem fs, final Path p) throws IOException { InputStream in = fs.open(p); try { in = in.markSupported()? in: new BufferedInputStream(in); int pblen = ProtobufUtil.lengthOfPBMagic(); in.mark(pblen); byte [] pbuf = new byte[pblen]; int read = in.read(pbuf); if (read != ... | Reference { public static Reference read(final FileSystem fs, final Path p) throws IOException { InputStream in = fs.open(p); try { in = in.markSupported()? in: new BufferedInputStream(in); int pblen = ProtobufUtil.lengthOfPBMagic(); in.mark(pblen); byte [] pbuf = new byte[pblen]; int read = in.read(pbuf); if (read != ... |
@Test public void testMetaUpdatedFlagInROOT() throws Exception { HMaster master = TEST_UTIL.getMiniHBaseCluster().getMaster(); boolean metaUpdated = MetaMigrationConvertingToPB. isMetaTableUpdated(master.getConnection()); assertEquals(true, metaUpdated); verifyMetaRowsAreUpdated(master.getConnection()); } | static boolean isMetaTableUpdated(final HConnection hConnection) throws IOException { List<Result> results = MetaTableAccessor.fullScanOfMeta(hConnection); if (results == null || results.isEmpty()) { LOG.info("hbase:meta doesn't have any entries to update."); return true; } for (Result r : results) { byte[] value = r.g... | MetaMigrationConvertingToPB { static boolean isMetaTableUpdated(final HConnection hConnection) throws IOException { List<Result> results = MetaTableAccessor.fullScanOfMeta(hConnection); if (results == null || results.isEmpty()) { LOG.info("hbase:meta doesn't have any entries to update."); return true; } for (Result r :... | MetaMigrationConvertingToPB { static boolean isMetaTableUpdated(final HConnection hConnection) throws IOException { List<Result> results = MetaTableAccessor.fullScanOfMeta(hConnection); if (results == null || results.isEmpty()) { LOG.info("hbase:meta doesn't have any entries to update."); return true; } for (Result r :... | MetaMigrationConvertingToPB { static boolean isMetaTableUpdated(final HConnection hConnection) throws IOException { List<Result> results = MetaTableAccessor.fullScanOfMeta(hConnection); if (results == null || results.isEmpty()) { LOG.info("hbase:meta doesn't have any entries to update."); return true; } for (Result r :... | MetaMigrationConvertingToPB { static boolean isMetaTableUpdated(final HConnection hConnection) throws IOException { List<Result> results = MetaTableAccessor.fullScanOfMeta(hConnection); if (results == null || results.isEmpty()) { LOG.info("hbase:meta doesn't have any entries to update."); return true; } for (Result r :... |
@Test public void testLocalHBaseCluster() throws Exception { TEST_UTIL.startMiniCluster(1, 1, null, MyHMaster.class, MyHRegionServer.class); try { int val = ((MyHMaster)TEST_UTIL.getHBaseCluster().getMaster(0)).echo(42); assertEquals(42, val); } catch (ClassCastException e) { fail("Could not cast master to our class");... | public LocalHBaseCluster(final Configuration conf) throws IOException { this(conf, DEFAULT_NO); } | LocalHBaseCluster { public LocalHBaseCluster(final Configuration conf) throws IOException { this(conf, DEFAULT_NO); } } | LocalHBaseCluster { public LocalHBaseCluster(final Configuration conf) throws IOException { this(conf, DEFAULT_NO); } LocalHBaseCluster(final Configuration conf); LocalHBaseCluster(final Configuration conf, final int noRegionServers); LocalHBaseCluster(final Configuration conf, final int noMasters,
final int no... | LocalHBaseCluster { public LocalHBaseCluster(final Configuration conf) throws IOException { this(conf, DEFAULT_NO); } LocalHBaseCluster(final Configuration conf); LocalHBaseCluster(final Configuration conf, final int noRegionServers); LocalHBaseCluster(final Configuration conf, final int noMasters,
final int no... | LocalHBaseCluster { public LocalHBaseCluster(final Configuration conf) throws IOException { this(conf, DEFAULT_NO); } LocalHBaseCluster(final Configuration conf); LocalHBaseCluster(final Configuration conf, final int noRegionServers); LocalHBaseCluster(final Configuration conf, final int noMasters,
final int no... |
@Test (timeout=180000) public void testTableCreate() throws Exception { AccessTestAction createTable = new AccessTestAction() { @Override public Object run() throws Exception { HTableDescriptor htd = new HTableDescriptor(TableName.valueOf("testnewtable")); htd.addFamily(new HColumnDescriptor(TEST_FAMILY)); ACCESS_CONTR... | @Override public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> c, HTableDescriptor desc, HRegionInfo[] regions) throws IOException { Set<byte[]> families = desc.getFamiliesKeys(); Map<byte[], Set<byte[]>> familyMap = new TreeMap<byte[], Set<byte[]>>(Bytes.BYTES_COMPARATOR); for (byte[] family: famil... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> c, HTableDescriptor desc, HRegionInfo[] regions) throws ... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> c, HTableDescriptor desc, HRegionInfo[] regions) throws ... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> c, HTableDescriptor desc, HRegionInfo[] regions) throws ... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> c, HTableDescriptor desc, HRegionInfo[] regions) throws ... |
@Test (timeout=180000) public void testTableModify() throws Exception { AccessTestAction modifyTable = new AccessTestAction() { @Override public Object run() throws Exception { HTableDescriptor htd = new HTableDescriptor(TEST_TABLE); htd.addFamily(new HColumnDescriptor(TEST_FAMILY)); htd.addFamily(new HColumnDescriptor... | @Override public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HTableDescriptor htd) throws IOException { requirePermission("modifyTable", tableName, null, null, Action.ADMIN, Action.CREATE); } | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HTableDescriptor htd) throws IOE... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HTableDescriptor htd) throws IOE... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HTableDescriptor htd) throws IOE... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName, HTableDescriptor htd) throws IOE... |
@Test (timeout=180000) public void testTableDelete() throws Exception { AccessTestAction deleteTable = new AccessTestAction() { @Override public Object run() throws Exception { ACCESS_CONTROLLER .preDeleteTable(ObserverContext.createAndPrepare(CP_ENV, null), TEST_TABLE); return null; } }; verifyAllowed(deleteTable, SUP... | @Override public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { requirePermission("deleteTable", tableName, null, null, Action.ADMIN, Action.CREATE); } | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { requirePerm... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { requirePerm... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { requirePerm... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, TableName tableName) throws IOException { requirePerm... |
@Test (timeout=180000) public void testTableTruncate() throws Exception { AccessTestAction truncateTable = new AccessTestAction() { @Override public Object run() throws Exception { ACCESS_CONTROLLER .preTruncateTable(ObserverContext.createAndPrepare(CP_ENV, null), TEST_TABLE); return null; } }; verifyAllowed(truncateTa... | @Override public void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> c, final TableName tableName) throws IOException { requirePermission("truncateTable", tableName, null, null, Action.ADMIN, Action.CREATE); final Configuration conf = c.getEnvironment().getConfiguration(); User.runAsLoginUser(new Privil... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> c, final TableName tableName) throws IOException { req... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> c, final TableName tableName) throws IOException { req... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> c, final TableName tableName) throws IOException { req... | AccessController extends BaseMasterAndRegionObserver implements RegionServerObserver,
AccessControlService.Interface, CoprocessorService, EndpointObserver, BulkLoadObserver { @Override public void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> c, final TableName tableName) throws IOException { req... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.