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 testgetHDFSBlocksDistribution() throws Exception { HBaseTestingUtility htu = new HBaseTestingUtility(); final int DEFAULT_BLOCK_SIZE = 1024; htu.getConfiguration().setLong("dfs.block.size", DEFAULT_BLOCK_SIZE); htu.getConfiguration().setInt("dfs.replication", 2); MiniHBaseCluster cluster = null; Strin...
public HDFSBlocksDistribution getHDFSBlocksDistribution() { HDFSBlocksDistribution hdfsBlocksDistribution = new HDFSBlocksDistribution(); synchronized (this.stores) { for (Store store : this.stores.values()) { for (StoreFile sf : store.getStorefiles()) { HDFSBlocksDistribution storeFileBlocksDistribution = sf.getHDFSBl...
HRegion implements HeapSize { public HDFSBlocksDistribution getHDFSBlocksDistribution() { HDFSBlocksDistribution hdfsBlocksDistribution = new HDFSBlocksDistribution(); synchronized (this.stores) { for (Store store : this.stores.values()) { for (StoreFile sf : store.getStorefiles()) { HDFSBlocksDistribution storeFileBlo...
HRegion implements HeapSize { public HDFSBlocksDistribution getHDFSBlocksDistribution() { HDFSBlocksDistribution hdfsBlocksDistribution = new HDFSBlocksDistribution(); synchronized (this.stores) { for (Store store : this.stores.values()) { for (StoreFile sf : store.getStorefiles()) { HDFSBlocksDistribution storeFileBlo...
HRegion implements HeapSize { public HDFSBlocksDistribution getHDFSBlocksDistribution() { HDFSBlocksDistribution hdfsBlocksDistribution = new HDFSBlocksDistribution(); synchronized (this.stores) { for (Store store : this.stores.values()) { for (StoreFile sf : store.getStorefiles()) { HDFSBlocksDistribution storeFileBlo...
HRegion implements HeapSize { public HDFSBlocksDistribution getHDFSBlocksDistribution() { HDFSBlocksDistribution hdfsBlocksDistribution = new HDFSBlocksDistribution(); synchronized (this.stores) { for (Store store : this.stores.values()) { for (StoreFile sf : store.getStorefiles()) { HDFSBlocksDistribution storeFileBlo...
@Test public void testErrorPropagation() throws Exception { ForeignExceptionDispatcher error = mock(ForeignExceptionDispatcher.class); SnapshotDescription snapshot = SnapshotDescription.newBuilder().setName("snapshot") .setTable("table").build(); final Exception thrown = new Exception("Failed!"); SnapshotTask fail = ne...
public void snapshotFailure(String message, Exception e) { ForeignException ee = new ForeignException(message, e); errorMonitor.receive(ee); }
SnapshotTask implements ForeignExceptionSnare, Callable<Void> { public void snapshotFailure(String message, Exception e) { ForeignException ee = new ForeignException(message, e); errorMonitor.receive(ee); } }
SnapshotTask implements ForeignExceptionSnare, Callable<Void> { public void snapshotFailure(String message, Exception e) { ForeignException ee = new ForeignException(message, e); errorMonitor.receive(ee); } SnapshotTask(SnapshotDescription snapshot, ForeignExceptionDispatcher monitor); }
SnapshotTask implements ForeignExceptionSnare, Callable<Void> { public void snapshotFailure(String message, Exception e) { ForeignException ee = new ForeignException(message, e); errorMonitor.receive(ee); } SnapshotTask(SnapshotDescription snapshot, ForeignExceptionDispatcher monitor); void snapshotFailure(String messa...
SnapshotTask implements ForeignExceptionSnare, Callable<Void> { public void snapshotFailure(String message, Exception e) { ForeignException ee = new ForeignException(message, e); errorMonitor.receive(ee); } SnapshotTask(SnapshotDescription snapshot, ForeignExceptionDispatcher monitor); void snapshotFailure(String messa...
@Test public void testBalanceSplit() throws Exception { List<Pair<Path, Long>> files = new ArrayList<Pair<Path, Long>>(); for (long i = 0; i <= 20; i++) { files.add(new Pair<Path, Long>(new Path("file-" + i), i)); } List<List<Path>> splits = ExportSnapshot.getBalancedSplits(files, 5); assertEquals(5, splits.size()); as...
static List<List<Path>> getBalancedSplits(final List<Pair<Path, Long>> files, int ngroups) { Collections.sort(files, new Comparator<Pair<Path, Long>>() { public int compare(Pair<Path, Long> a, Pair<Path, Long> b) { long r = a.getSecond() - b.getSecond(); return (r < 0) ? -1 : ((r > 0) ? 1 : 0); } }); List<List<Path>> f...
ExportSnapshot extends Configured implements Tool { static List<List<Path>> getBalancedSplits(final List<Pair<Path, Long>> files, int ngroups) { Collections.sort(files, new Comparator<Pair<Path, Long>>() { public int compare(Pair<Path, Long> a, Pair<Path, Long> b) { long r = a.getSecond() - b.getSecond(); return (r < 0...
ExportSnapshot extends Configured implements Tool { static List<List<Path>> getBalancedSplits(final List<Pair<Path, Long>> files, int ngroups) { Collections.sort(files, new Comparator<Pair<Path, Long>>() { public int compare(Pair<Path, Long> a, Pair<Path, Long> b) { long r = a.getSecond() - b.getSecond(); return (r < 0...
ExportSnapshot extends Configured implements Tool { static List<List<Path>> getBalancedSplits(final List<Pair<Path, Long>> files, int ngroups) { Collections.sort(files, new Comparator<Pair<Path, Long>>() { public int compare(Pair<Path, Long> a, Pair<Path, Long> b) { long r = a.getSecond() - b.getSecond(); return (r < 0...
ExportSnapshot extends Configured implements Tool { static List<List<Path>> getBalancedSplits(final List<Pair<Path, Long>> files, int ngroups) { Collections.sort(files, new Comparator<Pair<Path, Long>>() { public int compare(Pair<Path, Long> a, Pair<Path, Long> b) { long r = a.getSecond() - b.getSecond(); return (r < 0...
@Test public void testValidateMissingTableName() { Configuration conf = new Configuration(false); try { SnapshotDescriptionUtils.validate(SnapshotDescription.newBuilder().setName("fail").build(), conf); fail("Snapshot was considered valid without a table name"); } catch (IllegalArgumentException e) { LOG.debug("Correct...
public static SnapshotDescription validate(SnapshotDescription snapshot, Configuration conf) throws IllegalArgumentException { if (!snapshot.hasTable()) { throw new IllegalArgumentException( "Descriptor doesn't apply to a table, so we can't build it."); } long time = snapshot.getCreationTime(); if (time == SnapshotDesc...
SnapshotDescriptionUtils { public static SnapshotDescription validate(SnapshotDescription snapshot, Configuration conf) throws IllegalArgumentException { if (!snapshot.hasTable()) { throw new IllegalArgumentException( "Descriptor doesn't apply to a table, so we can't build it."); } long time = snapshot.getCreationTime(...
SnapshotDescriptionUtils { public static SnapshotDescription validate(SnapshotDescription snapshot, Configuration conf) throws IllegalArgumentException { if (!snapshot.hasTable()) { throw new IllegalArgumentException( "Descriptor doesn't apply to a table, so we can't build it."); } long time = snapshot.getCreationTime(...
SnapshotDescriptionUtils { public static SnapshotDescription validate(SnapshotDescription snapshot, Configuration conf) throws IllegalArgumentException { if (!snapshot.hasTable()) { throw new IllegalArgumentException( "Descriptor doesn't apply to a table, so we can't build it."); } long time = snapshot.getCreationTime(...
SnapshotDescriptionUtils { public static SnapshotDescription validate(SnapshotDescription snapshot, Configuration conf) throws IllegalArgumentException { if (!snapshot.hasTable()) { throw new IllegalArgumentException( "Descriptor doesn't apply to a table, so we can't build it."); } long time = snapshot.getCreationTime(...
@Test public void testFormatTableInfoSequenceId() { Path p0 = assertWriteAndReadSequenceid(0); StringBuilder sb = new StringBuilder(); for (int i = 0; i < FSTableDescriptors.WIDTH_OF_SEQUENCE_ID; i++) { sb.append("0"); } assertEquals(FSTableDescriptors.TABLEINFO_NAME + "." + sb.toString(), p0.getName()); Path p2 = asse...
static String formatTableInfoSequenceId(final int number) { byte [] b = new byte[WIDTH_OF_SEQUENCE_ID]; int d = Math.abs(number); for (int i = b.length - 1; i >= 0; i--) { b[i] = (byte)((d % 10) + '0'); d /= 10; } return Bytes.toString(b); }
FSTableDescriptors implements TableDescriptors { static String formatTableInfoSequenceId(final int number) { byte [] b = new byte[WIDTH_OF_SEQUENCE_ID]; int d = Math.abs(number); for (int i = b.length - 1; i >= 0; i--) { b[i] = (byte)((d % 10) + '0'); d /= 10; } return Bytes.toString(b); } }
FSTableDescriptors implements TableDescriptors { static String formatTableInfoSequenceId(final int number) { byte [] b = new byte[WIDTH_OF_SEQUENCE_ID]; int d = Math.abs(number); for (int i = b.length - 1; i >= 0; i--) { b[i] = (byte)((d % 10) + '0'); d /= 10; } return Bytes.toString(b); } FSTableDescriptors(final File...
FSTableDescriptors implements TableDescriptors { static String formatTableInfoSequenceId(final int number) { byte [] b = new byte[WIDTH_OF_SEQUENCE_ID]; int d = Math.abs(number); for (int i = b.length - 1; i >= 0; i--) { b[i] = (byte)((d % 10) + '0'); d /= 10; } return Bytes.toString(b); } FSTableDescriptors(final File...
FSTableDescriptors implements TableDescriptors { static String formatTableInfoSequenceId(final int number) { byte [] b = new byte[WIDTH_OF_SEQUENCE_ID]; int d = Math.abs(number); for (int i = b.length - 1; i >= 0; i--) { b[i] = (byte)((d % 10) + '0'); d /= 10; } return Bytes.toString(b); } FSTableDescriptors(final File...
@Test public void testCompleteSnapshotWithNoSnapshotDirectoryFailure() throws Exception { Path snapshotDir = new Path(root, ".snapshot"); Path tmpDir = new Path(snapshotDir, ".tmp"); Path workingDir = new Path(tmpDir, "not_a_snapshot"); assertFalse("Already have working snapshot dir: " + workingDir + " but shouldn't. T...
public static void completeSnapshot(SnapshotDescription snapshot, Path rootdir, Path workingDir, FileSystem fs) throws SnapshotCreationException, IOException { Path finishedDir = getCompletedSnapshotDir(snapshot, rootdir); LOG.debug("Snapshot is done, just moving the snapshot from " + workingDir + " to " + finishedDir)...
SnapshotDescriptionUtils { public static void completeSnapshot(SnapshotDescription snapshot, Path rootdir, Path workingDir, FileSystem fs) throws SnapshotCreationException, IOException { Path finishedDir = getCompletedSnapshotDir(snapshot, rootdir); LOG.debug("Snapshot is done, just moving the snapshot from " + working...
SnapshotDescriptionUtils { public static void completeSnapshot(SnapshotDescription snapshot, Path rootdir, Path workingDir, FileSystem fs) throws SnapshotCreationException, IOException { Path finishedDir = getCompletedSnapshotDir(snapshot, rootdir); LOG.debug("Snapshot is done, just moving the snapshot from " + working...
SnapshotDescriptionUtils { public static void completeSnapshot(SnapshotDescription snapshot, Path rootdir, Path workingDir, FileSystem fs) throws SnapshotCreationException, IOException { Path finishedDir = getCompletedSnapshotDir(snapshot, rootdir); LOG.debug("Snapshot is done, just moving the snapshot from " + working...
SnapshotDescriptionUtils { public static void completeSnapshot(SnapshotDescription snapshot, Path rootdir, Path workingDir, FileSystem fs) throws SnapshotCreationException, IOException { Path finishedDir = getCompletedSnapshotDir(snapshot, rootdir); LOG.debug("Snapshot is done, just moving the snapshot from " + working...
@Test public void testRun() throws IOException { FileSystem fs = UTIL.getTestFileSystem(); Path testdir = UTIL.getDataTestDir(); Path regionDir = new Path(testdir, "region"); Path family1 = new Path(regionDir, "fam1"); Path family2 = new Path(regionDir, "fam2"); fs.mkdirs(family2); Path file1 = new Path(family1, "05f99...
@Override public Void call() throws IOException { FileStatus[] families = FSUtils.listStatus(fs, regiondir, new FSUtils.FamilyDirFilter(fs)); if (families == null || families.length == 0) { LOG.info("No families under region directory:" + regiondir + ", not attempting to add references."); return null; } List<Path> sna...
ReferenceRegionHFilesTask extends SnapshotTask { @Override public Void call() throws IOException { FileStatus[] families = FSUtils.listStatus(fs, regiondir, new FSUtils.FamilyDirFilter(fs)); if (families == null || families.length == 0) { LOG.info("No families under region directory:" + regiondir + ", not attempting to...
ReferenceRegionHFilesTask extends SnapshotTask { @Override public Void call() throws IOException { FileStatus[] families = FSUtils.listStatus(fs, regiondir, new FSUtils.FamilyDirFilter(fs)); if (families == null || families.length == 0) { LOG.info("No families under region directory:" + regiondir + ", not attempting to...
ReferenceRegionHFilesTask extends SnapshotTask { @Override public Void call() throws IOException { FileStatus[] families = FSUtils.listStatus(fs, regiondir, new FSUtils.FamilyDirFilter(fs)); if (families == null || families.length == 0) { LOG.info("No families under region directory:" + regiondir + ", not attempting to...
ReferenceRegionHFilesTask extends SnapshotTask { @Override public Void call() throws IOException { FileStatus[] families = FSUtils.listStatus(fs, regiondir, new FSUtils.FamilyDirFilter(fs)); if (families == null || families.length == 0) { LOG.info("No families under region directory:" + regiondir + ", not attempting to...
@Test public void testCopyFiles() throws Exception { SnapshotDescription snapshot = SnapshotDescription.newBuilder().setName("snapshot").build(); ForeignExceptionDispatcher monitor = Mockito.mock(ForeignExceptionDispatcher.class); FileSystem fs = UTIL.getTestFileSystem(); Path root = UTIL.getDataTestDir(); String regio...
@Override public Void call() throws IOException { NavigableSet<Path> files = HLog.getSplitEditFilesSorted(this.fs, regiondir); if (files == null || files.size() == 0) return null; for (Path source : files) { FileStatus stat = fs.getFileStatus(source); if (stat.getLen() <= 0) continue; Path out = new Path(outputDir, sou...
CopyRecoveredEditsTask extends SnapshotTask { @Override public Void call() throws IOException { NavigableSet<Path> files = HLog.getSplitEditFilesSorted(this.fs, regiondir); if (files == null || files.size() == 0) return null; for (Path source : files) { FileStatus stat = fs.getFileStatus(source); if (stat.getLen() <= 0...
CopyRecoveredEditsTask extends SnapshotTask { @Override public Void call() throws IOException { NavigableSet<Path> files = HLog.getSplitEditFilesSorted(this.fs, regiondir); if (files == null || files.size() == 0) return null; for (Path source : files) { FileStatus stat = fs.getFileStatus(source); if (stat.getLen() <= 0...
CopyRecoveredEditsTask extends SnapshotTask { @Override public Void call() throws IOException { NavigableSet<Path> files = HLog.getSplitEditFilesSorted(this.fs, regiondir); if (files == null || files.size() == 0) return null; for (Path source : files) { FileStatus stat = fs.getFileStatus(source); if (stat.getLen() <= 0...
CopyRecoveredEditsTask extends SnapshotTask { @Override public Void call() throws IOException { NavigableSet<Path> files = HLog.getSplitEditFilesSorted(this.fs, regiondir); if (files == null || files.size() == 0) return null; for (Path source : files) { FileStatus stat = fs.getFileStatus(source); if (stat.getLen() <= 0...
@Test public void testNoEditsDir() throws Exception { SnapshotDescription snapshot = SnapshotDescription.newBuilder().setName("snapshot").build(); ForeignExceptionDispatcher monitor = Mockito.mock(ForeignExceptionDispatcher.class); FileSystem fs = UTIL.getTestFileSystem(); Path root = UTIL.getDataTestDir(); String regi...
@Override public Void call() throws IOException { NavigableSet<Path> files = HLog.getSplitEditFilesSorted(this.fs, regiondir); if (files == null || files.size() == 0) return null; for (Path source : files) { FileStatus stat = fs.getFileStatus(source); if (stat.getLen() <= 0) continue; Path out = new Path(outputDir, sou...
CopyRecoveredEditsTask extends SnapshotTask { @Override public Void call() throws IOException { NavigableSet<Path> files = HLog.getSplitEditFilesSorted(this.fs, regiondir); if (files == null || files.size() == 0) return null; for (Path source : files) { FileStatus stat = fs.getFileStatus(source); if (stat.getLen() <= 0...
CopyRecoveredEditsTask extends SnapshotTask { @Override public Void call() throws IOException { NavigableSet<Path> files = HLog.getSplitEditFilesSorted(this.fs, regiondir); if (files == null || files.size() == 0) return null; for (Path source : files) { FileStatus stat = fs.getFileStatus(source); if (stat.getLen() <= 0...
CopyRecoveredEditsTask extends SnapshotTask { @Override public Void call() throws IOException { NavigableSet<Path> files = HLog.getSplitEditFilesSorted(this.fs, regiondir); if (files == null || files.size() == 0) return null; for (Path source : files) { FileStatus stat = fs.getFileStatus(source); if (stat.getLen() <= 0...
CopyRecoveredEditsTask extends SnapshotTask { @Override public Void call() throws IOException { NavigableSet<Path> files = HLog.getSplitEditFilesSorted(this.fs, regiondir); if (files == null || files.size() == 0) return null; for (Path source : files) { FileStatus stat = fs.getFileStatus(source); if (stat.getLen() <= 0...
@Test public void testGetMaxFileSize() { HTableDescriptor desc = new HTableDescriptor("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; } protected HTableDescriptor(final byte [] name, HColumnDescriptor[] families); protected HTable...
HTableDescriptor implements WritableComparable<HTableDescriptor> { public long getMaxFileSize() { byte [] value = getValue(MAX_FILESIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; } protected HTableDescriptor(final byte [] name, HColumnDescriptor[] families); protected HTable...
HTableDescriptor implements WritableComparable<HTableDescriptor> { public long getMaxFileSize() { byte [] value = getValue(MAX_FILESIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; } protected HTableDescriptor(final byte [] name, HColumnDescriptor[] families); protected HTable...
@Test public void testGetMemStoreFlushSize() { HTableDescriptor desc = new HTableDescriptor("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; } protected HTableDescriptor(final byte [] name, HColumnDescriptor[] families); prote...
HTableDescriptor implements WritableComparable<HTableDescriptor> { public long getMemStoreFlushSize() { byte [] value = getValue(MEMSTORE_FLUSHSIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; } protected HTableDescriptor(final byte [] name, HColumnDescriptor[] families); prote...
HTableDescriptor implements WritableComparable<HTableDescriptor> { public long getMemStoreFlushSize() { byte [] value = getValue(MEMSTORE_FLUSHSIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; } protected HTableDescriptor(final byte [] name, HColumnDescriptor[] families); prote...
@Test public void testLegalHTableNames() { for (String tn : legalTableNames) { HTableDescriptor.isLegalTableName(Bytes.toBytes(tn)); } }
public static byte [] isLegalTableName(final byte [] tableName) { if (tableName == null || tableName.length <= 0) { throw new IllegalArgumentException("Name is null or empty"); } if (tableName[0] == '.' || tableName[0] == '-') { throw new IllegalArgumentException("Illegal first character <" + tableName[0] + "> at 0. Us...
HTableDescriptor implements WritableComparable<HTableDescriptor> { public static byte [] isLegalTableName(final byte [] tableName) { if (tableName == null || tableName.length <= 0) { throw new IllegalArgumentException("Name is null or empty"); } if (tableName[0] == '.' || tableName[0] == '-') { throw new IllegalArgumen...
HTableDescriptor implements WritableComparable<HTableDescriptor> { public static byte [] isLegalTableName(final byte [] tableName) { if (tableName == null || tableName.length <= 0) { throw new IllegalArgumentException("Name is null or empty"); } if (tableName[0] == '.' || tableName[0] == '-') { throw new IllegalArgumen...
HTableDescriptor implements WritableComparable<HTableDescriptor> { public static byte [] isLegalTableName(final byte [] tableName) { if (tableName == null || tableName.length <= 0) { throw new IllegalArgumentException("Name is null or empty"); } if (tableName[0] == '.' || tableName[0] == '-') { throw new IllegalArgumen...
HTableDescriptor implements WritableComparable<HTableDescriptor> { public static byte [] isLegalTableName(final byte [] tableName) { if (tableName == null || tableName.length <= 0) { throw new IllegalArgumentException("Name is null or empty"); } if (tableName[0] == '.' || tableName[0] == '-') { throw new IllegalArgumen...
@Test public void testIllegalHTableNames() { for (String tn : illegalTableNames) { try { HTableDescriptor.isLegalTableName(Bytes.toBytes(tn)); fail("invalid tablename " + tn + " should have failed"); } catch (Exception e) { } } }
public static byte [] isLegalTableName(final byte [] tableName) { if (tableName == null || tableName.length <= 0) { throw new IllegalArgumentException("Name is null or empty"); } if (tableName[0] == '.' || tableName[0] == '-') { throw new IllegalArgumentException("Illegal first character <" + tableName[0] + "> at 0. Us...
HTableDescriptor implements WritableComparable<HTableDescriptor> { public static byte [] isLegalTableName(final byte [] tableName) { if (tableName == null || tableName.length <= 0) { throw new IllegalArgumentException("Name is null or empty"); } if (tableName[0] == '.' || tableName[0] == '-') { throw new IllegalArgumen...
HTableDescriptor implements WritableComparable<HTableDescriptor> { public static byte [] isLegalTableName(final byte [] tableName) { if (tableName == null || tableName.length <= 0) { throw new IllegalArgumentException("Name is null or empty"); } if (tableName[0] == '.' || tableName[0] == '-') { throw new IllegalArgumen...
HTableDescriptor implements WritableComparable<HTableDescriptor> { public static byte [] isLegalTableName(final byte [] tableName) { if (tableName == null || tableName.length <= 0) { throw new IllegalArgumentException("Name is null or empty"); } if (tableName[0] == '.' || tableName[0] == '-') { throw new IllegalArgumen...
HTableDescriptor implements WritableComparable<HTableDescriptor> { public static byte [] isLegalTableName(final byte [] tableName) { if (tableName == null || tableName.length <= 0) { throw new IllegalArgumentException("Name is null or empty"); } if (tableName[0] == '.' || tableName[0] == '-') { throw new IllegalArgumen...
@Test public void testVerifyRootRegionLocationFails() throws IOException, InterruptedException, KeeperException { HConnection connection = Mockito.mock(HConnection.class); ConnectException connectException = new ConnectException("Connection refused"); final HRegionInterface implementation = Mockito.mock(HRegionInterfac...
public boolean verifyRootRegionLocation(final long timeout) throws InterruptedException, IOException { HRegionInterface connection = null; try { connection = waitForRootServerConnection(timeout); } catch (NotAllMetaRegionsOnlineException e) { } catch (ServerNotRunningYetException e) { } catch (UnknownHostException e) {...
CatalogTracker { public boolean verifyRootRegionLocation(final long timeout) throws InterruptedException, IOException { HRegionInterface connection = null; try { connection = waitForRootServerConnection(timeout); } catch (NotAllMetaRegionsOnlineException e) { } catch (ServerNotRunningYetException e) { } catch (UnknownH...
CatalogTracker { public boolean verifyRootRegionLocation(final long timeout) throws InterruptedException, IOException { HRegionInterface connection = null; try { connection = waitForRootServerConnection(timeout); } catch (NotAllMetaRegionsOnlineException e) { } catch (ServerNotRunningYetException e) { } catch (UnknownH...
CatalogTracker { public boolean verifyRootRegionLocation(final long timeout) throws InterruptedException, IOException { HRegionInterface connection = null; try { connection = waitForRootServerConnection(timeout); } catch (NotAllMetaRegionsOnlineException e) { } catch (ServerNotRunningYetException e) { } catch (UnknownH...
CatalogTracker { public boolean verifyRootRegionLocation(final long timeout) throws InterruptedException, IOException { HRegionInterface connection = null; try { connection = waitForRootServerConnection(timeout); } catch (NotAllMetaRegionsOnlineException e) { } catch (ServerNotRunningYetException e) { } catch (UnknownH...
@Test (expected = NotAllMetaRegionsOnlineException.class) public void testTimeoutWaitForRoot() throws IOException, InterruptedException { HConnection connection = Mockito.mock(HConnection.class); final CatalogTracker ct = constructAndStartCatalogTracker(connection); ct.waitForRoot(100); }
public void waitForRoot() throws InterruptedException { this.rootRegionTracker.blockUntilAvailable(); }
CatalogTracker { public void waitForRoot() throws InterruptedException { this.rootRegionTracker.blockUntilAvailable(); } }
CatalogTracker { public void waitForRoot() throws InterruptedException { this.rootRegionTracker.blockUntilAvailable(); } CatalogTracker(final Configuration conf); CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf, Abortable abortable); CatalogTracker(final ZooKeeperWatcher zk, final Configurat...
CatalogTracker { public void waitForRoot() throws InterruptedException { this.rootRegionTracker.blockUntilAvailable(); } CatalogTracker(final Configuration conf); CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf, Abortable abortable); CatalogTracker(final ZooKeeperWatcher zk, final Configurat...
CatalogTracker { public void waitForRoot() throws InterruptedException { this.rootRegionTracker.blockUntilAvailable(); } CatalogTracker(final Configuration conf); CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf, Abortable abortable); CatalogTracker(final ZooKeeperWatcher zk, final Configurat...
@Test public void testNoSuchTable() throws IOException { final String name = "testNoSuchTable"; FileSystem fs = FileSystem.get(UTIL.getConfiguration()); Path rootdir = new Path(UTIL.getDataTestDir(), name); TableDescriptors htds = new FSTableDescriptors(fs, rootdir); assertNull("There shouldn't be any HTD for this tabl...
@Override public HTableDescriptor get(final byte [] tablename) throws IOException { return get(Bytes.toString(tablename)); }
FSTableDescriptors implements TableDescriptors { @Override public HTableDescriptor get(final byte [] tablename) throws IOException { return get(Bytes.toString(tablename)); } }
FSTableDescriptors implements TableDescriptors { @Override public HTableDescriptor get(final byte [] tablename) throws IOException { return get(Bytes.toString(tablename)); } FSTableDescriptors(final FileSystem fs, final Path rootdir); FSTableDescriptors(final FileSystem fs, final Path rootdir, final boolean fsre...
FSTableDescriptors implements TableDescriptors { @Override public HTableDescriptor get(final byte [] tablename) throws IOException { return get(Bytes.toString(tablename)); } FSTableDescriptors(final FileSystem fs, final Path rootdir); FSTableDescriptors(final FileSystem fs, final Path rootdir, final boolean fsre...
FSTableDescriptors implements TableDescriptors { @Override public HTableDescriptor get(final byte [] tablename) throws IOException { return get(Bytes.toString(tablename)); } FSTableDescriptors(final FileSystem fs, final Path rootdir); FSTableDescriptors(final FileSystem fs, final Path rootdir, final boolean fsre...
@Test public void testCompareTo() { ServerName hsa1 = new ServerName("localhost", 1234, -1L); HRegionLocation hsl1 = new HRegionLocation(HRegionInfo.ROOT_REGIONINFO, hsa1.getHostname(), hsa1.getPort()); ServerName hsa2 = new ServerName("localhost", 1235, -1L); HRegionLocation hsl2 = new HRegionLocation(HRegionInfo.ROOT...
public int compareTo(HRegionLocation o) { int result = this.hostname.compareTo(o.getHostname()); if (result != 0) return result; return this.port - o.getPort(); }
HRegionLocation implements Comparable<HRegionLocation> { public int compareTo(HRegionLocation o) { int result = this.hostname.compareTo(o.getHostname()); if (result != 0) return result; return this.port - o.getPort(); } }
HRegionLocation implements Comparable<HRegionLocation> { public int compareTo(HRegionLocation o) { int result = this.hostname.compareTo(o.getHostname()); if (result != 0) return result; return this.port - o.getPort(); } HRegionLocation(HRegionInfo regionInfo, final String hostname, final int port); }
HRegionLocation implements Comparable<HRegionLocation> { public int compareTo(HRegionLocation o) { int result = this.hostname.compareTo(o.getHostname()); if (result != 0) return result; return this.port - o.getPort(); } HRegionLocation(HRegionInfo regionInfo, final String hostname, final int port); @Override sync...
HRegionLocation implements Comparable<HRegionLocation> { public int compareTo(HRegionLocation o) { int result = this.hostname.compareTo(o.getHostname()); if (result != 0) return result; return this.port - o.getPort(); } HRegionLocation(HRegionInfo regionInfo, final String hostname, final int port); @Override sync...
@Test (expected = RetriesExhaustedException.class) public void testTimeoutWaitForMeta() throws IOException, InterruptedException { HConnection connection = HConnectionTestingUtility.getMockedConnection(UTIL.getConfiguration()); try { final CatalogTracker ct = constructAndStartCatalogTracker(connection); ct.waitForMeta(...
public void waitForMeta() throws InterruptedException { while (!this.stopped) { try { if (waitForMeta(100) != null) break; } catch (NotAllMetaRegionsOnlineException e) { if (LOG.isTraceEnabled()) { LOG.info(".META. still not available, sleeping and retrying." + " Reason: " + e.getMessage()); } } catch (IOException e) {...
CatalogTracker { public void waitForMeta() throws InterruptedException { while (!this.stopped) { try { if (waitForMeta(100) != null) break; } catch (NotAllMetaRegionsOnlineException e) { if (LOG.isTraceEnabled()) { LOG.info(".META. still not available, sleeping and retrying." + " Reason: " + e.getMessage()); } } catch ...
CatalogTracker { public void waitForMeta() throws InterruptedException { while (!this.stopped) { try { if (waitForMeta(100) != null) break; } catch (NotAllMetaRegionsOnlineException e) { if (LOG.isTraceEnabled()) { LOG.info(".META. still not available, sleeping and retrying." + " Reason: " + e.getMessage()); } } catch ...
CatalogTracker { public void waitForMeta() throws InterruptedException { while (!this.stopped) { try { if (waitForMeta(100) != null) break; } catch (NotAllMetaRegionsOnlineException e) { if (LOG.isTraceEnabled()) { LOG.info(".META. still not available, sleeping and retrying." + " Reason: " + e.getMessage()); } } catch ...
CatalogTracker { public void waitForMeta() throws InterruptedException { while (!this.stopped) { try { if (waitForMeta(100) != null) break; } catch (NotAllMetaRegionsOnlineException e) { if (LOG.isTraceEnabled()) { LOG.info(".META. still not available, sleeping and retrying." + " Reason: " + e.getMessage()); } } catch ...
@Test public void testNoTimeoutWaitForRoot() throws IOException, InterruptedException, KeeperException { HConnection connection = Mockito.mock(HConnection.class); final CatalogTracker ct = constructAndStartCatalogTracker(connection); ServerName hsa = ct.getRootLocation(); Assert.assertNull(hsa); Thread t = new WaitOnMe...
public ServerName getRootLocation() throws InterruptedException { return this.rootRegionTracker.getRootRegionLocation(); }
CatalogTracker { public ServerName getRootLocation() throws InterruptedException { return this.rootRegionTracker.getRootRegionLocation(); } }
CatalogTracker { public ServerName getRootLocation() throws InterruptedException { return this.rootRegionTracker.getRootRegionLocation(); } CatalogTracker(final Configuration conf); CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf, Abortable abortable); CatalogTracker(final ZooKeeperWatcher z...
CatalogTracker { public ServerName getRootLocation() throws InterruptedException { return this.rootRegionTracker.getRootRegionLocation(); } CatalogTracker(final Configuration conf); CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf, Abortable abortable); CatalogTracker(final ZooKeeperWatcher z...
CatalogTracker { public ServerName getRootLocation() throws InterruptedException { return this.rootRegionTracker.getRootRegionLocation(); } CatalogTracker(final Configuration conf); CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf, Abortable abortable); CatalogTracker(final ZooKeeperWatcher z...
@Test public void testExists() throws TIOError, TException { ThriftHBaseServiceHandler handler = createHandler(); byte[] rowName = "testExists".getBytes(); ByteBuffer table = ByteBuffer.wrap(tableAname); TGet get = new TGet(ByteBuffer.wrap(rowName)); assertFalse(handler.exists(table, get)); List<TColumnValue> columnVal...
@Override public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException { HTableInterface htable = getTable(table.array()); 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 { HTableInterface htable = getTable(table.array()); try { return htable.exists(getFromThrift(get)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(ht...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { return htable.exists(getFromThrift(get)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(ht...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { return htable.exists(getFromThrift(get)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(ht...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { return htable.exists(getFromThrift(get)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(ht...
@Test public void testDeleteMultiple() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); ByteBuffer table = ByteBuffer.wrap(tableAname); byte[] rowName1 = "testDeleteMultiple1".getBytes(); byte[] rowName2 = "testDeleteMultiple2".getBytes(); List<TColumnValue> columnValues = new ArrayList<TColumnVa...
@Override public List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> deletes) throws TIOError, TException { HTableInterface htable = getTable(table.array()); List<Delete> tempDeletes = deletesFromThrift(deletes); try { htable.delete(tempDeletes); } catch (IOException e) { throw getTIOError(e); } finally { clos...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> deletes) throws TIOError, TException { HTableInterface htable = getTable(table.array()); List<Delete> tempDeletes = deletesFromThrift(deletes); try { htable.delete(tempDeletes); } cat...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> deletes) throws TIOError, TException { HTableInterface htable = getTable(table.array()); List<Delete> tempDeletes = deletesFromThrift(deletes); try { htable.delete(tempDeletes); } cat...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> deletes) throws TIOError, TException { HTableInterface htable = getTable(table.array()); List<Delete> tempDeletes = deletesFromThrift(deletes); try { htable.delete(tempDeletes); } cat...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> deletes) throws TIOError, TException { HTableInterface htable = getTable(table.array()); List<Delete> tempDeletes = deletesFromThrift(deletes); try { htable.delete(tempDeletes); } cat...
@Test public void testIncrement() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); byte[] rowName = "testIncrement".getBytes(); ByteBuffer table = ByteBuffer.wrap(tableAname); List<TColumnValue> columnValues = new ArrayList<TColumnValue>(); columnValues.add(new TColumnValue(ByteBuffer.wrap(family...
@Override public TResult increment(ByteBuffer table, TIncrement increment) throws TIOError, TException { HTableInterface htable = getTable(table.array()); 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 { HTableInterface htable = getTable(table.array()); try { return resultFromHBase(htable.increment(incrementFromThrift(increment))); } catch (IOException e) { ...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult increment(ByteBuffer table, TIncrement increment) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { return resultFromHBase(htable.increment(incrementFromThrift(increment))); } catch (IOException e) { ...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult increment(ByteBuffer table, TIncrement increment) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { return resultFromHBase(htable.increment(incrementFromThrift(increment))); } catch (IOException e) { ...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public TResult increment(ByteBuffer table, TIncrement increment) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { return resultFromHBase(htable.increment(incrementFromThrift(increment))); } catch (IOException e) { ...
@Test public void testCheckAndPut() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); byte[] rowName = "testCheckAndPut".getBytes(); ByteBuffer table = ByteBuffer.wrap(tableAname); List<TColumnValue> columnValuesA = new ArrayList<TColumnValue>(); TColumnValue columnValueA = new TColumnValue(ByteBu...
@Override public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut put) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { return htable.checkAndPut(row.array(), family.array(), qualifier.array(), (value == null) ? nu...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut put) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { return htable.checkAndPut(row.array...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut put) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { return htable.checkAndPut(row.array...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut put) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { return htable.checkAndPut(row.array...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut put) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { return htable.checkAndPut(row.array...
@Test public void testCheckAndDelete() throws Exception { ThriftHBaseServiceHandler handler = createHandler(); byte[] rowName = "testCheckAndDelete".getBytes(); ByteBuffer table = ByteBuffer.wrap(tableAname); List<TColumnValue> columnValuesA = new ArrayList<TColumnValue>(); TColumnValue columnValueA = new TColumnValue(...
@Override public boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete deleteSingle) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { if (value == null) { return htable.checkAndDelete(row.array(), family.array(), ...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete deleteSingle) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { if (value == null) {...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete deleteSingle) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { if (value == null) {...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete deleteSingle) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { if (value == null) {...
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete deleteSingle) throws TIOError, TException { HTableInterface htable = getTable(table.array()); try { if (value == null) {...
@Test public void testTableCreate() throws Exception { PrivilegedExceptionAction createTable = new PrivilegedExceptionAction() { public Object run() throws Exception { HTableDescriptor htd = new HTableDescriptor("testnewtable"); htd.addFamily(new HColumnDescriptor(TEST_FAMILY)); ACCESS_CONTROLLER.preCreateTable(Observe...
@Override public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> c, HTableDescriptor desc, HRegionInfo[] regions) throws IOException { Set<byte[]> families = desc.getFamiliesKeys(); HashMap<byte[], Set<byte[]>> familyMap = Maps.newHashMapWithExpectedSize(families.size()); for (byte[] family: families)...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> c, HTableDescriptor desc, HRegionInfo[] regions) throws IOException { Set<byte[]> families = desc.getFamiliesKeys(); ...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> c, HTableDescriptor desc, HRegionInfo[] regions) throws IOException { Set<byte[]> families = desc.getFamiliesKeys(); ...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> c, HTableDescriptor desc, HRegionInfo[] regions) throws IOException { Set<byte[]> families = desc.getFamiliesKeys(); ...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> c, HTableDescriptor desc, HRegionInfo[] regions) throws IOException { Set<byte[]> families = desc.getFamiliesKeys(); ...
@Test public void testTableModify() throws Exception { PrivilegedExceptionAction modifyTable = new PrivilegedExceptionAction() { public Object run() throws Exception { HTableDescriptor htd = new HTableDescriptor(TEST_TABLE); htd.addFamily(new HColumnDescriptor(TEST_FAMILY)); htd.addFamily(new HColumnDescriptor("fam_" +...
@Override public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HTableDescriptor htd) throws IOException { requirePermission("modifyTable", tableName, null, null, Action.ADMIN, Action.CREATE); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HTableDescriptor htd) throws IOException { requirePermission("modifyTable", tableName, null, nul...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HTableDescriptor htd) throws IOException { requirePermission("modifyTable", tableName, null, nul...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HTableDescriptor htd) throws IOException { requirePermission("modifyTable", tableName, null, nul...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HTableDescriptor htd) throws IOException { requirePermission("modifyTable", tableName, null, nul...
@Test public void testTableDelete() throws Exception { PrivilegedExceptionAction deleteTable = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER .preDeleteTable(ObserverContext.createAndPrepare(CP_ENV, null), TEST_TABLE); return null; } }; verifyAllowed(deleteTable, SUPERUSER, U...
@Override public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { requirePermission("deleteTable", tableName, null, null, Action.ADMIN, Action.CREATE); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { requirePermission("deleteTable", tableName, null, null, Action.ADMIN, Actio...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { requirePermission("deleteTable", tableName, null, null, Action.ADMIN, Actio...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { requirePermission("deleteTable", tableName, null, null, Action.ADMIN, Actio...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { requirePermission("deleteTable", tableName, null, null, Action.ADMIN, Actio...
@Test public void testReadingArchiveDirectoryFromFS() throws IOException { FileSystem fs = FileSystem.get(UTIL.getConfiguration()); try { new FSTableDescriptors(fs, FSUtils.getRootDir(UTIL.getConfiguration())) .get(HConstants.HFILE_ARCHIVE_DIRECTORY); fail("Shouldn't be able to read a table descriptor for the archive d...
@Override public HTableDescriptor get(final byte [] tablename) throws IOException { return get(Bytes.toString(tablename)); }
FSTableDescriptors implements TableDescriptors { @Override public HTableDescriptor get(final byte [] tablename) throws IOException { return get(Bytes.toString(tablename)); } }
FSTableDescriptors implements TableDescriptors { @Override public HTableDescriptor get(final byte [] tablename) throws IOException { return get(Bytes.toString(tablename)); } FSTableDescriptors(final FileSystem fs, final Path rootdir); FSTableDescriptors(final FileSystem fs, final Path rootdir, final boolean fsre...
FSTableDescriptors implements TableDescriptors { @Override public HTableDescriptor get(final byte [] tablename) throws IOException { return get(Bytes.toString(tablename)); } FSTableDescriptors(final FileSystem fs, final Path rootdir); FSTableDescriptors(final FileSystem fs, final Path rootdir, final boolean fsre...
FSTableDescriptors implements TableDescriptors { @Override public HTableDescriptor get(final byte [] tablename) throws IOException { return get(Bytes.toString(tablename)); } FSTableDescriptors(final FileSystem fs, final Path rootdir); FSTableDescriptors(final FileSystem fs, final Path rootdir, final boolean fsre...
@Test public void testAddColumn() throws Exception { final HColumnDescriptor hcd = new HColumnDescriptor("fam_new"); PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preAddColumn(ObserverContext.createAndPrepare(CP_ENV, null), TEST_TABLE, hcd)...
@Override public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HColumnDescriptor column) throws IOException { requirePermission("addColumn", tableName, null, null, Action.ADMIN, Action.CREATE); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HColumnDescriptor column) throws IOException { requirePermission("addColumn", tableName, null, nul...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HColumnDescriptor column) throws IOException { requirePermission("addColumn", tableName, null, nul...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HColumnDescriptor column) throws IOException { requirePermission("addColumn", tableName, null, nul...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HColumnDescriptor column) throws IOException { requirePermission("addColumn", tableName, null, nul...
@Test public void testModifyColumn() throws Exception { final HColumnDescriptor hcd = new HColumnDescriptor(TEST_FAMILY); hcd.setMaxVersions(10); PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preModifyColumn(ObserverContext.createAndPrepare...
@Override public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HColumnDescriptor descriptor) throws IOException { requirePermission("modifyColumn", tableName, null, null, Action.ADMIN, Action.CREATE); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HColumnDescriptor descriptor) throws IOException { requirePermission("modifyColumn", tableName,...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HColumnDescriptor descriptor) throws IOException { requirePermission("modifyColumn", tableName,...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HColumnDescriptor descriptor) throws IOException { requirePermission("modifyColumn", tableName,...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, HColumnDescriptor descriptor) throws IOException { requirePermission("modifyColumn", tableName,...
@Test public void testDeleteColumn() throws Exception { PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preDeleteColumn(ObserverContext.createAndPrepare(CP_ENV, null), TEST_TABLE, TEST_FAMILY); return null; } }; verifyAllowed(action, SUPERUSE...
@Override public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, byte[] col) throws IOException { requirePermission("deleteColumn", tableName, null, null, Action.ADMIN, Action.CREATE); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, byte[] col) throws IOException { requirePermission("deleteColumn", tableName, null, null, Actio...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, byte[] col) throws IOException { requirePermission("deleteColumn", tableName, null, null, Actio...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, byte[] col) throws IOException { requirePermission("deleteColumn", tableName, null, null, Actio...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName, byte[] col) throws IOException { requirePermission("deleteColumn", tableName, null, null, Actio...
@Test public void testTableDisable() throws Exception { PrivilegedExceptionAction disableTable = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preDisableTable(ObserverContext.createAndPrepare(CP_ENV, null), TEST_TABLE); return null; } }; PrivilegedExceptionAction disableAclT...
@Override public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { if (Bytes.equals(tableName, AccessControlLists.ACL_GLOBAL_NAME)) { throw new AccessDeniedException("Not allowed to disable " + AccessControlLists.ACL_TABLE_NAME_STR + " table."); } requirePermis...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { if (Bytes.equals(tableName, AccessControlLists.ACL_GLOBAL_NAME)) { throw n...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { if (Bytes.equals(tableName, AccessControlLists.ACL_GLOBAL_NAME)) { throw n...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { if (Bytes.equals(tableName, AccessControlLists.ACL_GLOBAL_NAME)) { throw n...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { if (Bytes.equals(tableName, AccessControlLists.ACL_GLOBAL_NAME)) { throw n...
@Test public void testTableEnable() throws Exception { PrivilegedExceptionAction enableTable = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER .preEnableTable(ObserverContext.createAndPrepare(CP_ENV, null), TEST_TABLE); return null; } }; verifyAllowed(enableTable, SUPERUSER, U...
@Override public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { requirePermission("enableTable", tableName, null, null, Action.ADMIN, Action.CREATE); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { requirePermission("enableTable", tableName, null, null, Action.ADMIN, Actio...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { requirePermission("enableTable", tableName, null, null, Action.ADMIN, Actio...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { requirePermission("enableTable", tableName, null, null, Action.ADMIN, Actio...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> c, byte[] tableName) throws IOException { requirePermission("enableTable", tableName, null, null, Action.ADMIN, Actio...
@Test public void testMove() throws Exception { Map<HRegionInfo, HServerAddress> regions; HTable table = new HTable(TEST_UTIL.getConfiguration(), TEST_TABLE); try { regions = table.getRegionsInfo(); } finally { table.close(); } final Map.Entry<HRegionInfo, HServerAddress> firstRegion = regions.entrySet().iterator().nex...
@Override public void preMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region, ServerName srcServer, ServerName destServer) throws IOException { requirePermission("move", region.getTableName(), null, null, Action.ADMIN); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region, ServerName srcServer, ServerName destServer) throws IOException { requirePermission("move", region.ge...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region, ServerName srcServer, ServerName destServer) throws IOException { requirePermission("move", region.ge...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region, ServerName srcServer, ServerName destServer) throws IOException { requirePermission("move", region.ge...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preMove(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo region, ServerName srcServer, ServerName destServer) throws IOException { requirePermission("move", region.ge...
@Test public void testAssign() throws Exception { Map<HRegionInfo, HServerAddress> regions; HTable table = new HTable(TEST_UTIL.getConfiguration(), TEST_TABLE); try { regions = table.getRegionsInfo(); } finally { table.close(); } final Map.Entry<HRegionInfo, HServerAddress> firstRegion = regions.entrySet().iterator().n...
@Override public void preAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requirePermission("assign", regionInfo.getTableName(), null, null, Action.ADMIN); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requirePermission("assign", regionInfo.getTableName(), null, null, Action....
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requirePermission("assign", regionInfo.getTableName(), null, null, Action....
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requirePermission("assign", regionInfo.getTableName(), null, null, Action....
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preAssign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo) throws IOException { requirePermission("assign", regionInfo.getTableName(), null, null, Action....
@Test public void testUnassign() throws Exception { Map<HRegionInfo, HServerAddress> regions; HTable table = new HTable(TEST_UTIL.getConfiguration(), TEST_TABLE); try { regions = table.getRegionsInfo(); } finally { table.close(); } final Map.Entry<HRegionInfo, HServerAddress> firstRegion = regions.entrySet().iterator()...
@Override public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo, boolean force) throws IOException { requirePermission("unassign", regionInfo.getTableName(), null, null, Action.ADMIN); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo, boolean force) throws IOException { requirePermission("unassign", regionInfo.getTableName(), ...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo, boolean force) throws IOException { requirePermission("unassign", regionInfo.getTableName(), ...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo, boolean force) throws IOException { requirePermission("unassign", regionInfo.getTableName(), ...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> c, HRegionInfo regionInfo, boolean force) throws IOException { requirePermission("unassign", regionInfo.getTableName(), ...
@Test public void testBalance() throws Exception { PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preBalance(ObserverContext.createAndPrepare(CP_ENV, null)); return null; } }; verifyAllowed(action, SUPERUSER, USER_ADMIN); verifyDenied(action...
@Override public void preBalance(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("balance", Permission.Action.ADMIN); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preBalance(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("balance", Permission.Action.ADMIN); } }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preBalance(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("balance", Permission.Action.ADMIN); } }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preBalance(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("balance", Permission.Action.ADMIN); } void requirePermission(String request, ...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preBalance(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("balance", Permission.Action.ADMIN); } void requirePermission(String request, ...
@Test public void testBalanceSwitch() throws Exception { PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preBalanceSwitch(ObserverContext.createAndPrepare(CP_ENV, null), true); return null; } }; verifyAllowed(action, SUPERUSER, USER_ADMIN); v...
@Override public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c, boolean newValue) throws IOException { requirePermission("balanceSwitch", Permission.Action.ADMIN); return newValue; }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c, boolean newValue) throws IOException { requirePermission("balanceSwitch", Permission.Action.ADMIN); return ne...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c, boolean newValue) throws IOException { requirePermission("balanceSwitch", Permission.Action.ADMIN); return ne...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c, boolean newValue) throws IOException { requirePermission("balanceSwitch", Permission.Action.ADMIN); return ne...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> c, boolean newValue) throws IOException { requirePermission("balanceSwitch", Permission.Action.ADMIN); return ne...
@Test public void testLoadClassFromLocalPath() throws Exception { ClassLoader parent = TestDynamicClassLoader.class.getClassLoader(); DynamicClassLoader classLoader = new DynamicClassLoader(conf, parent); String className = "TestLoadClassFromLocalPath"; deleteClass(className); try { classLoader.loadClass(className); fa...
@Override public Class<?> loadClass(String name) throws ClassNotFoundException { try { return parent.loadClass(name); } catch (ClassNotFoundException e) { if (LOG.isDebugEnabled()) { LOG.debug("Class " + name + " not found - using dynamical class loader"); } synchronized (getClassLoadingLock(name)) { Class<?> clasz = f...
DynamicClassLoader extends ClassLoaderBase { @Override public Class<?> loadClass(String name) throws ClassNotFoundException { try { return parent.loadClass(name); } catch (ClassNotFoundException e) { if (LOG.isDebugEnabled()) { LOG.debug("Class " + name + " not found - using dynamical class loader"); } synchronized (ge...
DynamicClassLoader extends ClassLoaderBase { @Override public Class<?> loadClass(String name) throws ClassNotFoundException { try { return parent.loadClass(name); } catch (ClassNotFoundException e) { if (LOG.isDebugEnabled()) { LOG.debug("Class " + name + " not found - using dynamical class loader"); } synchronized (ge...
DynamicClassLoader extends ClassLoaderBase { @Override public Class<?> loadClass(String name) throws ClassNotFoundException { try { return parent.loadClass(name); } catch (ClassNotFoundException e) { if (LOG.isDebugEnabled()) { LOG.debug("Class " + name + " not found - using dynamical class loader"); } synchronized (ge...
DynamicClassLoader extends ClassLoaderBase { @Override public Class<?> loadClass(String name) throws ClassNotFoundException { try { return parent.loadClass(name); } catch (ClassNotFoundException e) { if (LOG.isDebugEnabled()) { LOG.debug("Class " + name + " not found - using dynamical class loader"); } synchronized (ge...
@Test public void testShutdown() throws Exception { PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preShutdown(ObserverContext.createAndPrepare(CP_ENV, null)); return null; } }; verifyAllowed(action, SUPERUSER, USER_ADMIN); verifyDenied(acti...
@Override public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("shutdown", Permission.Action.ADMIN); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("shutdown", Permission.Action.ADMIN); } }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("shutdown", Permission.Action.ADMIN); } }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("shutdown", Permission.Action.ADMIN); } void requirePermission(String request...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("shutdown", Permission.Action.ADMIN); } void requirePermission(String request...
@Test public void testStopMaster() throws Exception { PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preStopMaster(ObserverContext.createAndPrepare(CP_ENV, null)); return null; } }; verifyAllowed(action, SUPERUSER, USER_ADMIN); verifyDenied(...
@Override public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("stopMaster", Permission.Action.ADMIN); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("stopMaster", Permission.Action.ADMIN); } }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("stopMaster", Permission.Action.ADMIN); } }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("stopMaster", Permission.Action.ADMIN); } void requirePermission(String req...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> c) throws IOException { requirePermission("stopMaster", Permission.Action.ADMIN); } void requirePermission(String req...
@Test public void testSplit() throws Exception { PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preSplit(ObserverContext.createAndPrepare(RCP_ENV, null)); return null; } }; verifyAllowed(action, SUPERUSER, USER_ADMIN, USER_OWNER); verifyDeni...
@Override public void preSplit(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { requirePermission("split", getTableName(e.getEnvironment()), null, null, Action.ADMIN); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preSplit(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { requirePermission("split", getTableName(e.getEnvironment()), null, null, Action.ADMIN); } }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preSplit(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { requirePermission("split", getTableName(e.getEnvironment()), null, null, Action.ADMIN); } }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preSplit(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { requirePermission("split", getTableName(e.getEnvironment()), null, null, Action.ADMIN); } void req...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preSplit(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { requirePermission("split", getTableName(e.getEnvironment()), null, null, Action.ADMIN); } void req...
@Test public void testFlush() throws Exception { PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preFlush(ObserverContext.createAndPrepare(RCP_ENV, null)); return null; } }; verifyAllowed(action, SUPERUSER, USER_ADMIN, USER_OWNER); verifyDeni...
@Override public void preFlush(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { requirePermission("flush", getTableName(e.getEnvironment()), null, null, Action.ADMIN); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preFlush(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { requirePermission("flush", getTableName(e.getEnvironment()), null, null, Action.ADMIN); } }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preFlush(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { requirePermission("flush", getTableName(e.getEnvironment()), null, null, Action.ADMIN); } }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preFlush(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { requirePermission("flush", getTableName(e.getEnvironment()), null, null, Action.ADMIN); } void req...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preFlush(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { requirePermission("flush", getTableName(e.getEnvironment()), null, null, Action.ADMIN); } void req...
@Test public void testCompact() throws Exception { PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preCompact(ObserverContext.createAndPrepare(RCP_ENV, null), null, null); return null; } }; verifyAllowed(action, SUPERUSER, USER_ADMIN, USER_OW...
@Override public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e, final Store store, final InternalScanner scanner) throws IOException { requirePermission("compact", getTableName(e.getEnvironment()), null, null, Action.ADMIN); return scanner; }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e, final Store store, final InternalScanner scanner) throws IOException { requirePermission("compact", getTabl...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e, final Store store, final InternalScanner scanner) throws IOException { requirePermission("compact", getTabl...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e, final Store store, final InternalScanner scanner) throws IOException { requirePermission("compact", getTabl...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e, final Store store, final InternalScanner scanner) throws IOException { requirePermission("compact", getTabl...
@Test public void testPreCompactSelection() throws Exception { PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preCompactSelection(ObserverContext.createAndPrepare(RCP_ENV, null), null, null); return null; } }; verifyAllowed(action, SUPERUSER...
@Override public void preCompactSelection(final ObserverContext<RegionCoprocessorEnvironment> e, final Store store, final List<StoreFile> candidates) throws IOException { requirePermission("compactSelection", getTableName(e.getEnvironment()), null, null, Action.ADMIN); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preCompactSelection(final ObserverContext<RegionCoprocessorEnvironment> e, final Store store, final List<StoreFile> candidates) throws IOException { requirePermission("compactSel...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preCompactSelection(final ObserverContext<RegionCoprocessorEnvironment> e, final Store store, final List<StoreFile> candidates) throws IOException { requirePermission("compactSel...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preCompactSelection(final ObserverContext<RegionCoprocessorEnvironment> e, final Store store, final List<StoreFile> candidates) throws IOException { requirePermission("compactSel...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preCompactSelection(final ObserverContext<RegionCoprocessorEnvironment> e, final Store store, final List<StoreFile> candidates) throws IOException { requirePermission("compactSel...
@Test public void testCheckPermissions() throws Exception { PrivilegedExceptionAction<Void> globalAdmin = new PrivilegedExceptionAction<Void>() { @Override public Void run() throws Exception { checkGlobalPerms(Permission.Action.ADMIN); return null; } }; verifyGlobal(globalAdmin); PrivilegedExceptionAction<Void> globalR...
@Override public void checkPermissions(Permission[] permissions) throws IOException { byte[] tableName = regionEnv.getRegion().getTableDesc().getName(); for (Permission permission : permissions) { if (permission instanceof TablePermission) { TablePermission tperm = (TablePermission) permission; for (Permission.Action a...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void checkPermissions(Permission[] permissions) throws IOException { byte[] tableName = regionEnv.getRegion().getTableDesc().getName(); for (Permission permission : permissions) { if ...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void checkPermissions(Permission[] permissions) throws IOException { byte[] tableName = regionEnv.getRegion().getTableDesc().getName(); for (Permission permission : permissions) { if ...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void checkPermissions(Permission[] permissions) throws IOException { byte[] tableName = regionEnv.getRegion().getTableDesc().getName(); for (Permission permission : permissions) { if ...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void checkPermissions(Permission[] permissions) throws IOException { byte[] tableName = regionEnv.getRegion().getTableDesc().getName(); for (Permission permission : permissions) { if ...
@Test public void testLockAction() throws Exception { PrivilegedExceptionAction lockAction = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preLockRow(ObserverContext.createAndPrepare(RCP_ENV, null), null, Bytes.toBytes("random_row")); return null; } }; verifyAllowed(lockActi...
@Override public void preLockRow(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] regionName, byte[] row) throws IOException { requirePermission("lockRow", getTableName(ctx.getEnvironment()), null, null, Permission.Action.WRITE, Permission.Action.CREATE); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preLockRow(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] regionName, byte[] row) throws IOException { requirePermission("lockRow", getTableName(ctx.getEnvironment()),...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preLockRow(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] regionName, byte[] row) throws IOException { requirePermission("lockRow", getTableName(ctx.getEnvironment()),...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preLockRow(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] regionName, byte[] row) throws IOException { requirePermission("lockRow", getTableName(ctx.getEnvironment()),...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preLockRow(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] regionName, byte[] row) throws IOException { requirePermission("lockRow", getTableName(ctx.getEnvironment()),...
@Test public void testUnLockAction() throws Exception { PrivilegedExceptionAction unLockAction = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preUnlockRow(ObserverContext.createAndPrepare(RCP_ENV, null), null, 123456); return null; } }; verifyAllowed(unLockAction, SUPERUSER...
@Override public void preUnlockRow(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] regionName, long lockId) throws IOException { requirePermission("unlockRow", getTableName(ctx.getEnvironment()), null, null, Permission.Action.WRITE, Permission.Action.CREATE); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preUnlockRow(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] regionName, long lockId) throws IOException { requirePermission("unlockRow", getTableName(ctx.getEnvironmen...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preUnlockRow(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] regionName, long lockId) throws IOException { requirePermission("unlockRow", getTableName(ctx.getEnvironmen...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preUnlockRow(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] regionName, long lockId) throws IOException { requirePermission("unlockRow", getTableName(ctx.getEnvironmen...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preUnlockRow(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] regionName, long lockId) throws IOException { requirePermission("unlockRow", getTableName(ctx.getEnvironmen...
@Test public void testStopRegionServer() throws Exception { PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preStopRegionServer(ObserverContext.createAndPrepare(RSCP_ENV, null)); return null; } }; verifyAllowed(action, SUPERUSER, USER_ADMIN);...
@Override public void preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> env) throws IOException { requirePermission("stop", Permission.Action.ADMIN); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> env) throws IOException { requirePermission("stop", Permission.Action.ADMIN); } }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> env) throws IOException { requirePermission("stop", Permission.Action.ADMIN); } }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> env) throws IOException { requirePermission("stop", Permission.Action.ADMIN); } void requirePermission(St...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> env) throws IOException { requirePermission("stop", Permission.Action.ADMIN); } void requirePermission(St...
@Test public void testOpenRegion() throws Exception { PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preOpen(ObserverContext.createAndPrepare(RCP_ENV, null)); return null; } }; verifyAllowed(action, SUPERUSER, USER_ADMIN); verifyDenied(actio...
@Override public void preOpen(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { RegionCoprocessorEnvironment env = e.getEnvironment(); final HRegion region = env.getRegion(); if (region == null) { LOG.error("NULL region from RegionCoprocessorEnvironment in preOpen()"); return; } else { HRegionInfo r...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preOpen(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { RegionCoprocessorEnvironment env = e.getEnvironment(); final HRegion region = env.getRegion(); if (r...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preOpen(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { RegionCoprocessorEnvironment env = e.getEnvironment(); final HRegion region = env.getRegion(); if (r...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preOpen(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { RegionCoprocessorEnvironment env = e.getEnvironment(); final HRegion region = env.getRegion(); if (r...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preOpen(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException { RegionCoprocessorEnvironment env = e.getEnvironment(); final HRegion region = env.getRegion(); if (r...
@Test public void testCloseRegion() throws Exception { PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws Exception { ACCESS_CONTROLLER.preClose(ObserverContext.createAndPrepare(RCP_ENV, null), false); return null; } }; verifyAllowed(action, SUPERUSER, USER_ADMIN); verifyDen...
@Override public void preClose(ObserverContext<RegionCoprocessorEnvironment> e, boolean abortRequested) throws IOException { requirePermission("close", Permission.Action.ADMIN); }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preClose(ObserverContext<RegionCoprocessorEnvironment> e, boolean abortRequested) throws IOException { requirePermission("close", Permission.Action.ADMIN); } }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preClose(ObserverContext<RegionCoprocessorEnvironment> e, boolean abortRequested) throws IOException { requirePermission("close", Permission.Action.ADMIN); } }
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preClose(ObserverContext<RegionCoprocessorEnvironment> e, boolean abortRequested) throws IOException { requirePermission("close", Permission.Action.ADMIN); } void requirePermiss...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void preClose(ObserverContext<RegionCoprocessorEnvironment> e, boolean abortRequested) throws IOException { requirePermission("close", Permission.Action.ADMIN); } void requirePermiss...
@Test public void testGlobalAuthorizationForNewRegisteredRS() throws Exception { LOG.debug("Test for global authorization for a new registered RegionServer."); MiniHBaseCluster hbaseCluster = TEST_UTIL.getHBaseCluster(); final HRegionServer oldRs = hbaseCluster.getRegionServer(0); HTable acl = new HTable(conf, AccessCo...
@Override public void grant(UserPermission perm) throws IOException { if (aclRegion) { if (LOG.isDebugEnabled()) { LOG.debug("Received request to grant access permission " + perm.toString()); } requirePermission("grant", perm.getTable(), perm.getFamily(), perm.getQualifier(), Action.ADMIN); AccessControlLists.addUserPe...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void grant(UserPermission perm) throws IOException { if (aclRegion) { if (LOG.isDebugEnabled()) { LOG.debug("Received request to grant access permission " + perm.toString()); } requir...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void grant(UserPermission perm) throws IOException { if (aclRegion) { if (LOG.isDebugEnabled()) { LOG.debug("Received request to grant access permission " + perm.toString()); } requir...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void grant(UserPermission perm) throws IOException { if (aclRegion) { if (LOG.isDebugEnabled()) { LOG.debug("Received request to grant access permission " + perm.toString()); } requir...
AccessController extends BaseRegionObserver implements MasterObserver, RegionServerObserver, AccessControllerProtocol { @Override public void grant(UserPermission perm) throws IOException { if (aclRegion) { if (LOG.isDebugEnabled()) { LOG.debug("Received request to grant access permission " + perm.toString()); } requir...
@Test public void testEnums() throws Exception { for (YarnApplicationState applicationState : YarnApplicationState.values()) { TypeConverter.fromYarn(applicationState, FinalApplicationStatus.FAILED); } for (TaskType taskType : TaskType.values()) { TypeConverter.fromYarn(taskType); } for (JobState jobState : JobState.va...
public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); }
TypeConverter { public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); } }
TypeConverter { public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); } }
TypeConverter { public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); } static org.apache.hadoop.mapred.JobID fromYarn(JobId id); static org.apache.hadoop.mapred...
TypeConverter { public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); } static org.apache.hadoop.mapred.JobID fromYarn(JobId id); static org.apache.hadoop.mapred...
@Test public void testFromYarn() throws Exception { int appStartTime = 612354; YarnApplicationState state = YarnApplicationState.RUNNING; ApplicationId applicationId = new ApplicationIdPBImpl(); ApplicationReportPBImpl applicationReport = new ApplicationReportPBImpl(); applicationReport.setApplicationId(applicationId);...
public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); }
TypeConverter { public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); } }
TypeConverter { public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); } }
TypeConverter { public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); } static org.apache.hadoop.mapred.JobID fromYarn(JobId id); static org.apache.hadoop.mapred...
TypeConverter { public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); } static org.apache.hadoop.mapred.JobID fromYarn(JobId id); static org.apache.hadoop.mapred...
@Test public void testFromYarnApplicationReport() { ApplicationId mockAppId = mock(ApplicationId.class); when(mockAppId.getClusterTimestamp()).thenReturn(12345L); when(mockAppId.getId()).thenReturn(6789); ApplicationReport mockReport = mock(ApplicationReport.class); when(mockReport.getTrackingUrl()).thenReturn("dummy-t...
public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); }
TypeConverter { public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); } }
TypeConverter { public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); } }
TypeConverter { public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); } static org.apache.hadoop.mapred.JobID fromYarn(JobId id); static org.apache.hadoop.mapred...
TypeConverter { public static org.apache.hadoop.mapred.JobID fromYarn(JobId id) { String identifier = fromClusterTimeStamp(id.getAppId().getClusterTimestamp()); return new org.apache.hadoop.mapred.JobID(identifier, id.getId()); } static org.apache.hadoop.mapred.JobID fromYarn(JobId id); static org.apache.hadoop.mapred...
@Test public void testFromYarnQueueInfo() { org.apache.hadoop.yarn.api.records.QueueInfo queueInfo = new QueueInfoPBImpl(); queueInfo.setQueueState(org.apache.hadoop.yarn.api.records.QueueState.STOPPED); org.apache.hadoop.mapreduce.QueueInfo returned = TypeConverter.fromYarn(queueInfo, new Configuration()); Assert.asse...
public static QueueInfo[] fromYarnQueueInfo( List<org.apache.hadoop.yarn.api.records.QueueInfo> queues, Configuration conf) { List<QueueInfo> queueInfos = new ArrayList<QueueInfo>(queues.size()); for (org.apache.hadoop.yarn.api.records.QueueInfo queue : queues) { queueInfos.add(TypeConverter.fromYarn(queue, conf)); } r...
TypeConverter { public static QueueInfo[] fromYarnQueueInfo( List<org.apache.hadoop.yarn.api.records.QueueInfo> queues, Configuration conf) { List<QueueInfo> queueInfos = new ArrayList<QueueInfo>(queues.size()); for (org.apache.hadoop.yarn.api.records.QueueInfo queue : queues) { queueInfos.add(TypeConverter.fromYarn(qu...
TypeConverter { public static QueueInfo[] fromYarnQueueInfo( List<org.apache.hadoop.yarn.api.records.QueueInfo> queues, Configuration conf) { List<QueueInfo> queueInfos = new ArrayList<QueueInfo>(queues.size()); for (org.apache.hadoop.yarn.api.records.QueueInfo queue : queues) { queueInfos.add(TypeConverter.fromYarn(qu...
TypeConverter { public static QueueInfo[] fromYarnQueueInfo( List<org.apache.hadoop.yarn.api.records.QueueInfo> queues, Configuration conf) { List<QueueInfo> queueInfos = new ArrayList<QueueInfo>(queues.size()); for (org.apache.hadoop.yarn.api.records.QueueInfo queue : queues) { queueInfos.add(TypeConverter.fromYarn(qu...
TypeConverter { public static QueueInfo[] fromYarnQueueInfo( List<org.apache.hadoop.yarn.api.records.QueueInfo> queues, Configuration conf) { List<QueueInfo> queueInfos = new ArrayList<QueueInfo>(queues.size()); for (org.apache.hadoop.yarn.api.records.QueueInfo queue : queues) { queueInfos.add(TypeConverter.fromYarn(qu...
@Test public void testJobIDtoString() { JobId jid = RecordFactoryProvider.getRecordFactory(null).newRecordInstance(JobId.class); jid.setAppId(RecordFactoryProvider.getRecordFactory(null).newRecordInstance(ApplicationId.class)); assertEquals("job_0_0000", MRApps.toString(jid)); }
public static String toString(JobId jid) { return jid.toString(); }
MRApps extends Apps { public static String toString(JobId jid) { return jid.toString(); } }
MRApps extends Apps { public static String toString(JobId jid) { return jid.toString(); } if(userClassesTakesPrecedence); }
MRApps extends Apps { public static String toString(JobId jid) { return jid.toString(); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAttemptId taid); static TaskAt...
MRApps extends Apps { public static String toString(JobId jid) { return jid.toString(); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAttemptId taid); static TaskAt...
@Test 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)); for (int i = 0;...
void assertMapEmpty() { assert map.size() == 0; }
IdLock { void assertMapEmpty() { assert map.size() == 0; } }
IdLock { void assertMapEmpty() { assert map.size() == 0; } }
IdLock { void assertMapEmpty() { assert map.size() == 0; } Entry getLockEntry(long id); void releaseLockEntry(Entry entry); }
IdLock { void assertMapEmpty() { assert map.size() == 0; } Entry getLockEntry(long id); void releaseLockEntry(Entry entry); }
@Test public void testToJobID() { JobId jid = MRApps.toJobID("job_1_1"); assertEquals(1, jid.getAppId().getClusterTimestamp()); assertEquals(1, jid.getAppId().getId()); assertEquals(1, jid.getId()); }
public static JobId toJobID(String jid) { return TypeConverter.toYarn(JobID.forName(jid)); }
MRApps extends Apps { public static JobId toJobID(String jid) { return TypeConverter.toYarn(JobID.forName(jid)); } }
MRApps extends Apps { public static JobId toJobID(String jid) { return TypeConverter.toYarn(JobID.forName(jid)); } if(userClassesTakesPrecedence); }
MRApps extends Apps { public static JobId toJobID(String jid) { return TypeConverter.toYarn(JobID.forName(jid)); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAttem...
MRApps extends Apps { public static JobId toJobID(String jid) { return TypeConverter.toYarn(JobID.forName(jid)); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAttem...
@Test(expected=IllegalArgumentException.class) public void testJobIDShort() { MRApps.toJobID("job_0_0_0"); }
public static JobId toJobID(String jid) { return TypeConverter.toYarn(JobID.forName(jid)); }
MRApps extends Apps { public static JobId toJobID(String jid) { return TypeConverter.toYarn(JobID.forName(jid)); } }
MRApps extends Apps { public static JobId toJobID(String jid) { return TypeConverter.toYarn(JobID.forName(jid)); } if(userClassesTakesPrecedence); }
MRApps extends Apps { public static JobId toJobID(String jid) { return TypeConverter.toYarn(JobID.forName(jid)); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAttem...
MRApps extends Apps { public static JobId toJobID(String jid) { return TypeConverter.toYarn(JobID.forName(jid)); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAttem...
@Test public void testTaskIDtoString() { TaskId tid = RecordFactoryProvider.getRecordFactory(null).newRecordInstance(TaskId.class); tid.setJobId(RecordFactoryProvider.getRecordFactory(null).newRecordInstance(JobId.class)); tid.getJobId().setAppId(RecordFactoryProvider.getRecordFactory(null).newRecordInstance(Applicatio...
public static String toString(JobId jid) { return jid.toString(); }
MRApps extends Apps { public static String toString(JobId jid) { return jid.toString(); } }
MRApps extends Apps { public static String toString(JobId jid) { return jid.toString(); } if(userClassesTakesPrecedence); }
MRApps extends Apps { public static String toString(JobId jid) { return jid.toString(); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAttemptId taid); static TaskAt...
MRApps extends Apps { public static String toString(JobId jid) { return jid.toString(); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAttemptId taid); static TaskAt...
@Test public void testToTaskID() { TaskId tid = MRApps.toTaskID("task_1_2_r_3"); assertEquals(1, tid.getJobId().getAppId().getClusterTimestamp()); assertEquals(2, tid.getJobId().getAppId().getId()); assertEquals(2, tid.getJobId().getId()); assertEquals(TaskType.REDUCE, tid.getTaskType()); assertEquals(3, tid.getId()); ...
public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); }
MRApps extends Apps { public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); } }
MRApps extends Apps { public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); } if(userClassesTakesPrecedence); }
MRApps extends Apps { public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAt...
MRApps extends Apps { public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAt...
@Test(expected=IllegalArgumentException.class) public void testTaskIDShort() { MRApps.toTaskID("task_0_0000_m"); }
public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); }
MRApps extends Apps { public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); } }
MRApps extends Apps { public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); } if(userClassesTakesPrecedence); }
MRApps extends Apps { public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAt...
MRApps extends Apps { public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAt...
@Test(expected=IllegalArgumentException.class) public void testTaskIDBadType() { MRApps.toTaskID("task_0_0000_x_000000"); }
public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); }
MRApps extends Apps { public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); } }
MRApps extends Apps { public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); } if(userClassesTakesPrecedence); }
MRApps extends Apps { public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAt...
MRApps extends Apps { public static TaskId toTaskID(String tid) { return TypeConverter.toYarn(TaskID.forName(tid)); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAt...
@Test public void testTaskAttemptIDtoString() { TaskAttemptId taid = RecordFactoryProvider.getRecordFactory(null).newRecordInstance(TaskAttemptId.class); taid.setTaskId(RecordFactoryProvider.getRecordFactory(null).newRecordInstance(TaskId.class)); taid.getTaskId().setTaskType(TaskType.MAP); taid.getTaskId().setJobId(Re...
public static String toString(JobId jid) { return jid.toString(); }
MRApps extends Apps { public static String toString(JobId jid) { return jid.toString(); } }
MRApps extends Apps { public static String toString(JobId jid) { return jid.toString(); } if(userClassesTakesPrecedence); }
MRApps extends Apps { public static String toString(JobId jid) { return jid.toString(); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAttemptId taid); static TaskAt...
MRApps extends Apps { public static String toString(JobId jid) { return jid.toString(); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAttemptId taid); static TaskAt...
@Test public void testToTaskAttemptID() { TaskAttemptId taid = MRApps.toTaskAttemptID("attempt_0_1_m_2_3"); assertEquals(0, taid.getTaskId().getJobId().getAppId().getClusterTimestamp()); assertEquals(1, taid.getTaskId().getJobId().getAppId().getId()); assertEquals(1, taid.getTaskId().getJobId().getId()); assertEquals(2...
public static TaskAttemptId toTaskAttemptID(String taid) { return TypeConverter.toYarn(TaskAttemptID.forName(taid)); }
MRApps extends Apps { public static TaskAttemptId toTaskAttemptID(String taid) { return TypeConverter.toYarn(TaskAttemptID.forName(taid)); } }
MRApps extends Apps { public static TaskAttemptId toTaskAttemptID(String taid) { return TypeConverter.toYarn(TaskAttemptID.forName(taid)); } if(userClassesTakesPrecedence); }
MRApps extends Apps { public static TaskAttemptId toTaskAttemptID(String taid) { return TypeConverter.toYarn(TaskAttemptID.forName(taid)); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static...
MRApps extends Apps { public static TaskAttemptId toTaskAttemptID(String taid) { return TypeConverter.toYarn(TaskAttemptID.forName(taid)); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static...
@Test(expected=IllegalArgumentException.class) public void testTaskAttemptIDShort() { MRApps.toTaskAttemptID("attempt_0_0_0_m_0"); }
public static TaskAttemptId toTaskAttemptID(String taid) { return TypeConverter.toYarn(TaskAttemptID.forName(taid)); }
MRApps extends Apps { public static TaskAttemptId toTaskAttemptID(String taid) { return TypeConverter.toYarn(TaskAttemptID.forName(taid)); } }
MRApps extends Apps { public static TaskAttemptId toTaskAttemptID(String taid) { return TypeConverter.toYarn(TaskAttemptID.forName(taid)); } if(userClassesTakesPrecedence); }
MRApps extends Apps { public static TaskAttemptId toTaskAttemptID(String taid) { return TypeConverter.toYarn(TaskAttemptID.forName(taid)); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static...
MRApps extends Apps { public static TaskAttemptId toTaskAttemptID(String taid) { return TypeConverter.toYarn(TaskAttemptID.forName(taid)); } if(userClassesTakesPrecedence); static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static...
@Test public void testSetClasspath() throws IOException { Job job = Job.getInstance(); Map<String, String> environment = new HashMap<String, String>(); MRApps.setClasspath(environment, job.getConfiguration()); assertTrue(environment.get("CLASSPATH").startsWith("$PWD:")); String yarnAppClasspath = job.getConfiguration()...
@SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLASSPATH.name(), Environ...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
@Test public void testHBaseFsck() throws Exception { assertNoErrors(doFsck(conf, false)); String table = "tableBadMetaAssign"; TEST_UTIL.createTable(Bytes.toBytes(table), FAM); assertNoErrors(doFsck(conf, false)); HTable meta = new HTable(conf, HTableDescriptor.META_TABLEDESC.getName()); ResultScanner scanner = meta.ge...
public HBaseFsck(Configuration conf) throws MasterNotRunningException, ZooKeeperConnectionException, IOException, ClassNotFoundException { super(conf); errors = getErrorReporter(conf); int numThreads = conf.getInt("hbasefsck.numthreads", MAX_NUM_THREADS); executor = new ScheduledThreadPoolExecutor(numThreads); }
HBaseFsck extends Configured implements Tool { public HBaseFsck(Configuration conf) throws MasterNotRunningException, ZooKeeperConnectionException, IOException, ClassNotFoundException { super(conf); errors = getErrorReporter(conf); int numThreads = conf.getInt("hbasefsck.numthreads", MAX_NUM_THREADS); executor = new Sc...
HBaseFsck extends Configured implements Tool { public HBaseFsck(Configuration conf) throws MasterNotRunningException, ZooKeeperConnectionException, IOException, ClassNotFoundException { super(conf); errors = getErrorReporter(conf); int numThreads = conf.getInt("hbasefsck.numthreads", MAX_NUM_THREADS); executor = new Sc...
HBaseFsck extends Configured implements Tool { public HBaseFsck(Configuration conf) throws MasterNotRunningException, ZooKeeperConnectionException, IOException, ClassNotFoundException { super(conf); errors = getErrorReporter(conf); int numThreads = conf.getInt("hbasefsck.numthreads", MAX_NUM_THREADS); executor = new Sc...
HBaseFsck extends Configured implements Tool { public HBaseFsck(Configuration conf) throws MasterNotRunningException, ZooKeeperConnectionException, IOException, ClassNotFoundException { super(conf); errors = getErrorReporter(conf); int numThreads = conf.getInt("hbasefsck.numthreads", MAX_NUM_THREADS); executor = new Sc...
@Test public void testSetClasspathWithArchives () throws IOException { File testTGZ = new File(testWorkDir, "test.tgz"); FileOutputStream out = new FileOutputStream(testTGZ); out.write(0); out.close(); Job job = Job.getInstance(); Configuration conf = job.getConfiguration(); conf.set(MRJobConfig.CLASSPATH_ARCHIVES, "fi...
@SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLASSPATH.name(), Environ...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
@Test public void testSetClasspathWithUserPrecendence() { Configuration conf = new Configuration(); conf.setBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, true); Map<String, String> env = new HashMap<String, String>(); try { MRApps.setClasspath(env, conf); } catch (Exception e) { fail("Got exception while sett...
@SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLASSPATH.name(), Environ...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
@Test public void testSetClasspathWithNoUserPrecendence() { Configuration conf = new Configuration(); conf.setBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Map<String, String> env = new HashMap<String, String>(); try { MRApps.setClasspath(env, conf); } catch (Exception e) { fail("Got exception while s...
@SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLASSPATH.name(), Environ...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
MRApps extends Apps { @SuppressWarnings("deprecation") public static void setClasspath(Map<String, String> environment, Configuration conf) throws IOException { boolean userClassesTakesPrecedence = conf.getBoolean(MRJobConfig.MAPREDUCE_JOB_USER_CLASSPATH_FIRST, false); Apps.addToEnvironment(environment, Environment.CLA...
@Test public void testUserNamePercentEncoding() throws IOException { JobIndexInfo info = new JobIndexInfo(); JobID oldJobId = JobID.forName(JOB_ID); JobId jobId = TypeConverter.toYarn(oldJobId); info.setJobId(jobId); info.setSubmitTime(Long.parseLong(SUBMIT_TIME)); info.setUser(USER_NAME_WITH_DELIMITER); info.setJobNam...
public static String getDoneFileName(JobIndexInfo indexInfo) throws IOException { StringBuilder sb = new StringBuilder(); sb.append(escapeDelimiters(TypeConverter.fromYarn(indexInfo.getJobId()).toString())); sb.append(DELIMITER); sb.append(indexInfo.getSubmitTime()); sb.append(DELIMITER); sb.append(escapeDelimiters(get...
FileNameIndexUtils { public static String getDoneFileName(JobIndexInfo indexInfo) throws IOException { StringBuilder sb = new StringBuilder(); sb.append(escapeDelimiters(TypeConverter.fromYarn(indexInfo.getJobId()).toString())); sb.append(DELIMITER); sb.append(indexInfo.getSubmitTime()); sb.append(DELIMITER); sb.append...
FileNameIndexUtils { public static String getDoneFileName(JobIndexInfo indexInfo) throws IOException { StringBuilder sb = new StringBuilder(); sb.append(escapeDelimiters(TypeConverter.fromYarn(indexInfo.getJobId()).toString())); sb.append(DELIMITER); sb.append(indexInfo.getSubmitTime()); sb.append(DELIMITER); sb.append...
FileNameIndexUtils { public static String getDoneFileName(JobIndexInfo indexInfo) throws IOException { StringBuilder sb = new StringBuilder(); sb.append(escapeDelimiters(TypeConverter.fromYarn(indexInfo.getJobId()).toString())); sb.append(DELIMITER); sb.append(indexInfo.getSubmitTime()); sb.append(DELIMITER); sb.append...
FileNameIndexUtils { public static String getDoneFileName(JobIndexInfo indexInfo) throws IOException { StringBuilder sb = new StringBuilder(); sb.append(escapeDelimiters(TypeConverter.fromYarn(indexInfo.getJobId()).toString())); sb.append(DELIMITER); sb.append(indexInfo.getSubmitTime()); sb.append(DELIMITER); sb.append...
@Test public void testUserNamePercentDecoding() throws IOException { String jobHistoryFile = String.format(JOB_HISTORY_FILE_FORMATTER, JOB_ID, SUBMIT_TIME, USER_NAME_WITH_DELIMITER_ESCAPE, JOB_NAME, FINISH_TIME, NUM_MAPS, NUM_REDUCES, JOB_STATUS, QUEUE_NAME); JobIndexInfo info = FileNameIndexUtils.getIndexInfo(jobHisto...
public static JobIndexInfo getIndexInfo(String jhFileName) throws IOException { String fileName = jhFileName.substring(0, jhFileName.indexOf(JobHistoryUtils.JOB_HISTORY_FILE_EXTENSION)); JobIndexInfo indexInfo = new JobIndexInfo(); String[] jobDetails = fileName.split(DELIMITER); JobID oldJobId = JobID.forName(decodeJo...
FileNameIndexUtils { public static JobIndexInfo getIndexInfo(String jhFileName) throws IOException { String fileName = jhFileName.substring(0, jhFileName.indexOf(JobHistoryUtils.JOB_HISTORY_FILE_EXTENSION)); JobIndexInfo indexInfo = new JobIndexInfo(); String[] jobDetails = fileName.split(DELIMITER); JobID oldJobId = J...
FileNameIndexUtils { public static JobIndexInfo getIndexInfo(String jhFileName) throws IOException { String fileName = jhFileName.substring(0, jhFileName.indexOf(JobHistoryUtils.JOB_HISTORY_FILE_EXTENSION)); JobIndexInfo indexInfo = new JobIndexInfo(); String[] jobDetails = fileName.split(DELIMITER); JobID oldJobId = J...
FileNameIndexUtils { public static JobIndexInfo getIndexInfo(String jhFileName) throws IOException { String fileName = jhFileName.substring(0, jhFileName.indexOf(JobHistoryUtils.JOB_HISTORY_FILE_EXTENSION)); JobIndexInfo indexInfo = new JobIndexInfo(); String[] jobDetails = fileName.split(DELIMITER); JobID oldJobId = J...
FileNameIndexUtils { public static JobIndexInfo getIndexInfo(String jhFileName) throws IOException { String fileName = jhFileName.substring(0, jhFileName.indexOf(JobHistoryUtils.JOB_HISTORY_FILE_EXTENSION)); JobIndexInfo indexInfo = new JobIndexInfo(); String[] jobDetails = fileName.split(DELIMITER); JobID oldJobId = J...
@Test public void testJobNamePercentEncoding() throws IOException { JobIndexInfo info = new JobIndexInfo(); JobID oldJobId = JobID.forName(JOB_ID); JobId jobId = TypeConverter.toYarn(oldJobId); info.setJobId(jobId); info.setSubmitTime(Long.parseLong(SUBMIT_TIME)); info.setUser(USER_NAME); info.setJobName(JOB_NAME_WITH_...
public static String getDoneFileName(JobIndexInfo indexInfo) throws IOException { StringBuilder sb = new StringBuilder(); sb.append(escapeDelimiters(TypeConverter.fromYarn(indexInfo.getJobId()).toString())); sb.append(DELIMITER); sb.append(indexInfo.getSubmitTime()); sb.append(DELIMITER); sb.append(escapeDelimiters(get...
FileNameIndexUtils { public static String getDoneFileName(JobIndexInfo indexInfo) throws IOException { StringBuilder sb = new StringBuilder(); sb.append(escapeDelimiters(TypeConverter.fromYarn(indexInfo.getJobId()).toString())); sb.append(DELIMITER); sb.append(indexInfo.getSubmitTime()); sb.append(DELIMITER); sb.append...
FileNameIndexUtils { public static String getDoneFileName(JobIndexInfo indexInfo) throws IOException { StringBuilder sb = new StringBuilder(); sb.append(escapeDelimiters(TypeConverter.fromYarn(indexInfo.getJobId()).toString())); sb.append(DELIMITER); sb.append(indexInfo.getSubmitTime()); sb.append(DELIMITER); sb.append...
FileNameIndexUtils { public static String getDoneFileName(JobIndexInfo indexInfo) throws IOException { StringBuilder sb = new StringBuilder(); sb.append(escapeDelimiters(TypeConverter.fromYarn(indexInfo.getJobId()).toString())); sb.append(DELIMITER); sb.append(indexInfo.getSubmitTime()); sb.append(DELIMITER); sb.append...
FileNameIndexUtils { public static String getDoneFileName(JobIndexInfo indexInfo) throws IOException { StringBuilder sb = new StringBuilder(); sb.append(escapeDelimiters(TypeConverter.fromYarn(indexInfo.getJobId()).toString())); sb.append(DELIMITER); sb.append(indexInfo.getSubmitTime()); sb.append(DELIMITER); sb.append...
@Test public void testHS() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("history") .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject json = response.getEntit...
@GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
@Test public void testHSSlash() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("history/") .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject json = response.ge...
@GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
@Test public void testHSDefault() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("history/") .get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject json = response.getEntity(JSONObject.class); assert...
@GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
@Test public void testHSXML() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("history") .accept(MediaType.APPLICATION_XML).get(ClientResponse.class); assertEquals(MediaType.APPLICATION_XML_TYPE, response.getType()); String xml = response.getEntity(St...
@GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
@Test public void testHBaseFsckClean() throws Exception { assertNoErrors(doFsck(conf, false)); String table = "tableClean"; try { HBaseFsck hbck = doFsck(conf, false); assertNoErrors(hbck); setupTable(table); assertEquals(ROWKEYS.length, countRows()); hbck = doFsck(conf, false); assertNoErrors(hbck); assertEquals(0, hb...
public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; }
HBaseFsck extends Configured implements Tool { public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } }
HBaseFsck extends Configured implements Tool { public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); }
HBaseFsck extends Configured implements Tool { public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair(); int ...
HBaseFsck extends Configured implements Tool { public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair(); int ...
@Test public void testInfo() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("history") .path("info").accept(MediaType.APPLICATION_JSON) .get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject json = r...
@GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
@Test public void testInfoSlash() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("history") .path("info/").accept(MediaType.APPLICATION_JSON) .get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject js...
@GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
@Test public void testInfoDefault() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("history") .path("info/").get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject json = response.getEntity(JSONObject...
@GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
@Test public void testInfoXML() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("history") .path("info/").accept(MediaType.APPLICATION_XML) .get(ClientResponse.class); assertEquals(MediaType.APPLICATION_XML_TYPE, response.getType()); String xml = resp...
@GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
@Test public void testInvalidUri() throws JSONException, Exception { WebResource r = resource(); String responseStr = ""; try { responseStr = r.path("ws").path("v1").path("history").path("bogus") .accept(MediaType.APPLICATION_JSON).get(String.class); fail("should have thrown exception on invalid uri"); } catch (Uniform...
@GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
@Test public void testInvalidUri2() throws JSONException, Exception { WebResource r = resource(); String responseStr = ""; try { responseStr = r.path("ws").path("v1").path("invalid") .accept(MediaType.APPLICATION_JSON).get(String.class); fail("should have thrown exception on invalid uri"); } catch (UniformInterfaceExce...
@GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
@Test public void testInvalidAccept() throws JSONException, Exception { WebResource r = resource(); String responseStr = ""; try { responseStr = r.path("ws").path("v1").path("history") .accept(MediaType.TEXT_PLAIN).get(String.class); fail("should have thrown exception on invalid uri"); } catch (UniformInterfaceExceptio...
@GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); }
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
HsWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public HistoryInfo get() { return getHistoryInfo(); } @Inject HsWebServices(final HistoryContext ctx, final Configuration conf, final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })...
@Test public void testTaskStartTimes() { TaskId taskId = Mockito.mock(TaskId.class); TaskInfo taskInfo = Mockito.mock(TaskInfo.class); Map<TaskAttemptID, TaskAttemptInfo> taskAttempts = new TreeMap<TaskAttemptID, TaskAttemptInfo>(); TaskAttemptID id = new TaskAttemptID("0", 0, TaskType.MAP, 0, 0); TaskAttemptInfo info ...
@Override public synchronized TaskReport getReport() { if (report == null) { constructTaskReport(); } return report; }
CompletedTask implements Task { @Override public synchronized TaskReport getReport() { if (report == null) { constructTaskReport(); } return report; } }
CompletedTask implements Task { @Override public synchronized TaskReport getReport() { if (report == null) { constructTaskReport(); } return report; } CompletedTask(TaskId taskId, TaskInfo taskInfo); }
CompletedTask implements Task { @Override public synchronized TaskReport getReport() { if (report == null) { constructTaskReport(); } return report; } CompletedTask(TaskId taskId, TaskInfo taskInfo); @Override boolean canCommit(TaskAttemptId taskAttemptID); @Override TaskAttempt getAttempt(TaskAttemptId attemptID); @Ov...
CompletedTask implements Task { @Override public synchronized TaskReport getReport() { if (report == null) { constructTaskReport(); } return report; } CompletedTask(TaskId taskId, TaskInfo taskInfo); @Override boolean canCommit(TaskAttemptId taskAttemptID); @Override TaskAttempt getAttempt(TaskAttemptId attemptID); @Ov...
@Test public void testObtainTokens() throws Exception { Credentials credentials = new Credentials(); FileSystem fs = mock(FileSystem.class); TokenCache.obtainTokensForNamenodesInternal(fs, credentials, conf); verify(fs).addDelegationTokens(eq(renewer), eq(credentials)); }
static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, conf); } }
TokenCache { static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, ...
TokenCache { static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, ...
TokenCache { static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, ...
TokenCache { static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, ...
@Test @SuppressWarnings("deprecation") public void testBinaryCredentials() throws Exception { Path TEST_ROOT_DIR = new Path(System.getProperty("test.build.data","test/build/data")); String binaryTokenFile = FileSystem.getLocal(conf).makeQualified( new Path(TEST_ROOT_DIR, "tokenFile")).toUri().getPath(); MockFileSystem ...
static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, conf); } }
TokenCache { static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, ...
TokenCache { static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, ...
TokenCache { static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, ...
TokenCache { static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, ...
@Test public void testDupeStartKey() throws Exception { String table = "tableDupeStartKey"; try { setupTable(table); assertNoErrors(doFsck(conf, false)); assertEquals(ROWKEYS.length, countRows()); HRegionInfo hriDupe = createRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("A"), Bytes.toBytes("A2")); TEST_UTIL.getH...
public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; }
HBaseFsck extends Configured implements Tool { public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } }
HBaseFsck extends Configured implements Tool { public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); }
HBaseFsck extends Configured implements Tool { public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair(); int ...
HBaseFsck extends Configured implements Tool { public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair(); int ...
@Test public void testSingleTokenFetch() throws Exception { Configuration conf = new Configuration(); conf.set(YarnConfiguration.RM_PRINCIPAL, "mapred/host@REALM"); String renewer = Master.getMasterPrincipal(conf); Credentials credentials = new Credentials(); final MockFileSystem fs = new MockFileSystem(); final MockFi...
static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, conf); } }
TokenCache { static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, ...
TokenCache { static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, ...
TokenCache { static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, ...
TokenCache { static void obtainTokensForNamenodesInternal(Credentials credentials, Path[] ps, Configuration conf) throws IOException { Set<FileSystem> fsSet = new HashSet<FileSystem>(); for(Path p: ps) { fsSet.add(p.getFileSystem(conf)); } for (FileSystem fs : fsSet) { obtainTokensForNamenodesInternal(fs, credentials, ...
@Test public void testCleanUpTokenReferral() throws Exception { Configuration conf = new Configuration(); conf.set(MRJobConfig.MAPREDUCE_JOB_CREDENTIALS_BINARY, "foo"); TokenCache.cleanUpTokenReferral(conf); assertNull(conf.get(MRJobConfig.MAPREDUCE_JOB_CREDENTIALS_BINARY)); }
public static void cleanUpTokenReferral(Configuration conf) { conf.unset(MRJobConfig.MAPREDUCE_JOB_CREDENTIALS_BINARY); }
TokenCache { public static void cleanUpTokenReferral(Configuration conf) { conf.unset(MRJobConfig.MAPREDUCE_JOB_CREDENTIALS_BINARY); } }
TokenCache { public static void cleanUpTokenReferral(Configuration conf) { conf.unset(MRJobConfig.MAPREDUCE_JOB_CREDENTIALS_BINARY); } }
TokenCache { public static void cleanUpTokenReferral(Configuration conf) { conf.unset(MRJobConfig.MAPREDUCE_JOB_CREDENTIALS_BINARY); } static byte[] getSecretKey(Credentials credentials, Text alias); static void obtainTokensForNamenodes(Credentials credentials, Path[] ps, Configuration conf); static void cleanUp...
TokenCache { public static void cleanUpTokenReferral(Configuration conf) { conf.unset(MRJobConfig.MAPREDUCE_JOB_CREDENTIALS_BINARY); } static byte[] getSecretKey(Credentials credentials, Text alias); static void obtainTokensForNamenodes(Credentials credentials, Path[] ps, Configuration conf); static void cleanUp...
@SuppressWarnings("rawtypes") @Test public void testTipFailed() throws Exception { JobConf job = new JobConf(); job.setNumMapTasks(2); TaskStatus status = new TaskStatus() { @Override public boolean getIsMap() { return false; } @Override public void addFetchFailedMap(TaskAttemptID mapTaskId) { } }; Progress progress = ...
public synchronized void tipFailed(TaskID taskId) { if (!finishedMaps[taskId.getId()]) { finishedMaps[taskId.getId()] = true; if (--remainingMaps == 0) { notifyAll(); } updateStatus(); } }
ShuffleScheduler { public synchronized void tipFailed(TaskID taskId) { if (!finishedMaps[taskId.getId()]) { finishedMaps[taskId.getId()] = true; if (--remainingMaps == 0) { notifyAll(); } updateStatus(); } } }
ShuffleScheduler { public synchronized void tipFailed(TaskID taskId) { if (!finishedMaps[taskId.getId()]) { finishedMaps[taskId.getId()] = true; if (--remainingMaps == 0) { notifyAll(); } updateStatus(); } } ShuffleScheduler(JobConf job, TaskStatus status, ExceptionReporter reporter, ...
ShuffleScheduler { public synchronized void tipFailed(TaskID taskId) { if (!finishedMaps[taskId.getId()]) { finishedMaps[taskId.getId()] = true; if (--remainingMaps == 0) { notifyAll(); } updateStatus(); } } ShuffleScheduler(JobConf job, TaskStatus status, ExceptionReporter reporter, ...
ShuffleScheduler { public synchronized void tipFailed(TaskID taskId) { if (!finishedMaps[taskId.getId()]) { finishedMaps[taskId.getId()] = true; if (--remainingMaps == 0) { notifyAll(); } updateStatus(); } } ShuffleScheduler(JobConf job, TaskStatus status, ExceptionReporter reporter, ...
@SuppressWarnings("unchecked") @Test public void testCopyFromHostBogusHeader() throws Exception { LOG.info("testCopyFromHostBogusHeader"); JobConf job = new JobConf(); TaskAttemptID id = TaskAttemptID.forName("attempt_0_1_r_1_1"); ShuffleScheduler<Text, Text> ss = mock(ShuffleScheduler.class); MergeManagerImpl<Text, Te...
@VisibleForTesting protected void copyFromHost(MapHost host) throws IOException { List<TaskAttemptID> maps = scheduler.getMapsForHost(host); if (maps.size() == 0) { return; } if(LOG.isDebugEnabled()) { LOG.debug("Fetcher " + id + " going to fetch from " + host + " for: " + maps); } Set<TaskAttemptID> remaining = new Ha...
Fetcher extends Thread { @VisibleForTesting protected void copyFromHost(MapHost host) throws IOException { List<TaskAttemptID> maps = scheduler.getMapsForHost(host); if (maps.size() == 0) { return; } if(LOG.isDebugEnabled()) { LOG.debug("Fetcher " + id + " going to fetch from " + host + " for: " + maps); } Set<TaskAtte...
Fetcher extends Thread { @VisibleForTesting protected void copyFromHost(MapHost host) throws IOException { List<TaskAttemptID> maps = scheduler.getMapsForHost(host); if (maps.size() == 0) { return; } if(LOG.isDebugEnabled()) { LOG.debug("Fetcher " + id + " going to fetch from " + host + " for: " + maps); } Set<TaskAtte...
Fetcher extends Thread { @VisibleForTesting protected void copyFromHost(MapHost host) throws IOException { List<TaskAttemptID> maps = scheduler.getMapsForHost(host); if (maps.size() == 0) { return; } if(LOG.isDebugEnabled()) { LOG.debug("Fetcher " + id + " going to fetch from " + host + " for: " + maps); } Set<TaskAtte...
Fetcher extends Thread { @VisibleForTesting protected void copyFromHost(MapHost host) throws IOException { List<TaskAttemptID> maps = scheduler.getMapsForHost(host); if (maps.size() == 0) { return; } if(LOG.isDebugEnabled()) { LOG.debug("Fetcher " + id + " going to fetch from " + host + " for: " + maps); } Set<TaskAtte...
@SuppressWarnings("unchecked") @Test public void testCopyFromHostWait() throws Exception { LOG.info("testCopyFromHostWait"); JobConf job = new JobConf(); TaskAttemptID id = TaskAttemptID.forName("attempt_0_1_r_1_1"); ShuffleScheduler<Text, Text> ss = mock(ShuffleScheduler.class); MergeManagerImpl<Text, Text> mm = mock(...
@VisibleForTesting protected void copyFromHost(MapHost host) throws IOException { List<TaskAttemptID> maps = scheduler.getMapsForHost(host); if (maps.size() == 0) { return; } if(LOG.isDebugEnabled()) { LOG.debug("Fetcher " + id + " going to fetch from " + host + " for: " + maps); } Set<TaskAttemptID> remaining = new Ha...
Fetcher extends Thread { @VisibleForTesting protected void copyFromHost(MapHost host) throws IOException { List<TaskAttemptID> maps = scheduler.getMapsForHost(host); if (maps.size() == 0) { return; } if(LOG.isDebugEnabled()) { LOG.debug("Fetcher " + id + " going to fetch from " + host + " for: " + maps); } Set<TaskAtte...
Fetcher extends Thread { @VisibleForTesting protected void copyFromHost(MapHost host) throws IOException { List<TaskAttemptID> maps = scheduler.getMapsForHost(host); if (maps.size() == 0) { return; } if(LOG.isDebugEnabled()) { LOG.debug("Fetcher " + id + " going to fetch from " + host + " for: " + maps); } Set<TaskAtte...
Fetcher extends Thread { @VisibleForTesting protected void copyFromHost(MapHost host) throws IOException { List<TaskAttemptID> maps = scheduler.getMapsForHost(host); if (maps.size() == 0) { return; } if(LOG.isDebugEnabled()) { LOG.debug("Fetcher " + id + " going to fetch from " + host + " for: " + maps); } Set<TaskAtte...
Fetcher extends Thread { @VisibleForTesting protected void copyFromHost(MapHost host) throws IOException { List<TaskAttemptID> maps = scheduler.getMapsForHost(host); if (maps.size() == 0) { return; } if(LOG.isDebugEnabled()) { LOG.debug("Fetcher " + id + " going to fetch from " + host + " for: " + maps); } Set<TaskAtte...
@Test public void testConsecutiveFetch() throws IOException { final int MAX_EVENTS_TO_FETCH = 100; TaskAttemptID tid = new TaskAttemptID("12345", 1, TaskType.REDUCE, 1, 1); TaskUmbilicalProtocol umbilical = mock(TaskUmbilicalProtocol.class); when(umbilical.getMapCompletionEvents(any(JobID.class), anyInt(), anyInt(), an...
protected int getMapCompletionEvents() throws IOException { int numNewMaps = 0; TaskCompletionEvent events[] = null; do { MapTaskCompletionEventsUpdate update = umbilical.getMapCompletionEvents( (org.apache.hadoop.mapred.JobID)reduce.getJobID(), fromEventIdx, maxEventsToFetch, (org.apache.hadoop.mapred.TaskAttemptID)re...
EventFetcher extends Thread { protected int getMapCompletionEvents() throws IOException { int numNewMaps = 0; TaskCompletionEvent events[] = null; do { MapTaskCompletionEventsUpdate update = umbilical.getMapCompletionEvents( (org.apache.hadoop.mapred.JobID)reduce.getJobID(), fromEventIdx, maxEventsToFetch, (org.apache....
EventFetcher extends Thread { protected int getMapCompletionEvents() throws IOException { int numNewMaps = 0; TaskCompletionEvent events[] = null; do { MapTaskCompletionEventsUpdate update = umbilical.getMapCompletionEvents( (org.apache.hadoop.mapred.JobID)reduce.getJobID(), fromEventIdx, maxEventsToFetch, (org.apache....
EventFetcher extends Thread { protected int getMapCompletionEvents() throws IOException { int numNewMaps = 0; TaskCompletionEvent events[] = null; do { MapTaskCompletionEventsUpdate update = umbilical.getMapCompletionEvents( (org.apache.hadoop.mapred.JobID)reduce.getJobID(), fromEventIdx, maxEventsToFetch, (org.apache....
EventFetcher extends Thread { protected int getMapCompletionEvents() throws IOException { int numNewMaps = 0; TaskCompletionEvent events[] = null; do { MapTaskCompletionEventsUpdate update = umbilical.getMapCompletionEvents( (org.apache.hadoop.mapred.JobID)reduce.getJobID(), fromEventIdx, maxEventsToFetch, (org.apache....
@Test public void testDupeRegion() throws Exception { String table = "tableDupeRegion"; try { setupTable(table); assertNoErrors(doFsck(conf, false)); assertEquals(ROWKEYS.length, countRows()); HRegionInfo hriDupe = createRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("A"), Bytes.toBytes("B")); TEST_UTIL.getHBaseC...
public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; }
HBaseFsck extends Configured implements Tool { public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } }
HBaseFsck extends Configured implements Tool { public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); }
HBaseFsck extends Configured implements Tool { public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair(); int ...
HBaseFsck extends Configured implements Tool { public Multimap<byte[], HbckInfo> getOverlapGroups( String table) { TableInfo ti = tablesInfo.get(table); return ti.overlapGroups; } HBaseFsck(Configuration conf); HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair(); int ...
@Test public void testFindContainingJar() throws Exception { testJarAtPath(JAR_RELATIVE_PATH); }
public static String findContainingJar(Class my_class) { return ClassUtil.findContainingJar(my_class); }
JobConf extends Configuration { public static String findContainingJar(Class my_class) { return ClassUtil.findContainingJar(my_class); } }
JobConf extends Configuration { public static String findContainingJar(Class my_class) { return ClassUtil.findContainingJar(my_class); } JobConf(); JobConf(Class exampleClass); JobConf(Configuration conf); JobConf(Configuration conf, Class exampleClass); JobConf(String config); JobConf(Path config); JobConf(boole...
JobConf extends Configuration { public static String findContainingJar(Class my_class) { return ClassUtil.findContainingJar(my_class); } JobConf(); JobConf(Class exampleClass); JobConf(Configuration conf); JobConf(Configuration conf, Class exampleClass); JobConf(String config); JobConf(Path config); JobConf(boole...
JobConf extends Configuration { public static String findContainingJar(Class my_class) { return ClassUtil.findContainingJar(my_class); } JobConf(); JobConf(Class exampleClass); JobConf(Configuration conf); JobConf(Configuration conf, Class exampleClass); JobConf(String config); JobConf(Path config); JobConf(boole...
@Test public void testCounters() throws IOException { Enum[] keysWithResource = {TaskCounter.MAP_INPUT_RECORDS, TaskCounter.MAP_OUTPUT_BYTES}; Enum[] keysWithoutResource = {myCounters.TEST1, myCounters.TEST2}; String[] groups = {"group1", "group2", "group{}()[]"}; String[] counters = {"counter1", "counter2", "counter{}...
public Counters() { super(groupFactory); }
Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public Counters() { super(groupFactory); } }
Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public Counters() { super(groupFactory); } Counters(); Counters(org.apache.hadoop.mapreduce.Counters newCounters); }
Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public Counters() { super(groupFactory); } Counters(); Counters(org.apache.hadoop.mapreduce.Counters newCounters); synchronized Group getGroup(String groupName); @SuppressWarnings("unchecked") synchronized Collection<String> getGroupNames(); synchro...
Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public Counters() { super(groupFactory); } Counters(); Counters(org.apache.hadoop.mapreduce.Counters newCounters); synchronized Group getGroup(String groupName); @SuppressWarnings("unchecked") synchronized Collection<String> getGroupNames(); synchro...