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 |
|---|---|---|---|---|---|
@SuppressWarnings("deprecation") @Test public void testCounterValue() { Counters counters = new Counters(); final int NUMBER_TESTS = 100; final int NUMBER_INC = 10; final Random rand = new Random(); for (int i = 0; i < NUMBER_TESTS; i++) { long initValue = rand.nextInt(); long expectedValue = initValue; Counter counter... | public synchronized Counter findCounter(String group, String name) { if (name.equals("MAP_INPUT_BYTES")) { LOG.warn("Counter name MAP_INPUT_BYTES is deprecated. " + "Use FileInputFormatCounters as group name and " + " BYTES_READ as counter name instead"); return findCounter(FileInputFormatCounter.BYTES_READ); } return ... | Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public synchronized Counter findCounter(String group, String name) { if (name.equals("MAP_INPUT_BYTES")) { LOG.warn("Counter name MAP_INPUT_BYTES is deprecated. " + "Use FileInputFormatCounters as group name and " + " BYTES_READ as counter name inste... | Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public synchronized Counter findCounter(String group, String name) { if (name.equals("MAP_INPUT_BYTES")) { LOG.warn("Counter name MAP_INPUT_BYTES is deprecated. " + "Use FileInputFormatCounters as group name and " + " BYTES_READ as counter name inste... | Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public synchronized Counter findCounter(String group, String name) { if (name.equals("MAP_INPUT_BYTES")) { LOG.warn("Counter name MAP_INPUT_BYTES is deprecated. " + "Use FileInputFormatCounters as group name and " + " BYTES_READ as counter name inste... | Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public synchronized Counter findCounter(String group, String name) { if (name.equals("MAP_INPUT_BYTES")) { LOG.warn("Counter name MAP_INPUT_BYTES is deprecated. " + "Use FileInputFormatCounters as group name and " + " BYTES_READ as counter name inste... |
@SuppressWarnings("deprecation") @Test public void testCounterIteratorConcurrency() { Counters counters = new Counters(); counters.incrCounter("group1", "counter1", 1); Iterator<Group> iterator = counters.iterator(); counters.incrCounter("group2", "counter2", 1); iterator.next(); } | public void incrCounter(Enum<?> key, long amount) { findCounter(key).increment(amount); } | Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public void incrCounter(Enum<?> key, long amount) { findCounter(key).increment(amount); } } | Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public void incrCounter(Enum<?> key, long amount) { findCounter(key).increment(amount); } Counters(); Counters(org.apache.hadoop.mapreduce.Counters newCounters); } | Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public void incrCounter(Enum<?> key, long amount) { findCounter(key).increment(amount); } Counters(); Counters(org.apache.hadoop.mapreduce.Counters newCounters); synchronized Group getGroup(String groupName); @SuppressWarnings("unchecked") synchroni... | Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public void incrCounter(Enum<?> key, long amount) { findCounter(key).increment(amount); } Counters(); Counters(org.apache.hadoop.mapreduce.Counters newCounters); synchronized Group getGroup(String groupName); @SuppressWarnings("unchecked") synchroni... |
@Test public void testMakeCompactString() { final String GC1 = "group1.counter1:1"; final String GC2 = "group2.counter2:3"; Counters counters = new Counters(); counters.incrCounter("group1", "counter1", 1); assertEquals("group1.counter1:1", counters.makeCompactString()); counters.incrCounter("group2", "counter2", 3); S... | public synchronized String makeCompactString() { StringBuilder builder = new StringBuilder(); boolean first = true; for(Group group: this){ for(Counter counter: group) { if (first) { first = false; } else { builder.append(','); } builder.append(group.getDisplayName()); builder.append('.'); builder.append(counter.getDis... | Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public synchronized String makeCompactString() { StringBuilder builder = new StringBuilder(); boolean first = true; for(Group group: this){ for(Counter counter: group) { if (first) { first = false; } else { builder.append(','); } builder.append(group... | Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public synchronized String makeCompactString() { StringBuilder builder = new StringBuilder(); boolean first = true; for(Group group: this){ for(Counter counter: group) { if (first) { first = false; } else { builder.append(','); } builder.append(group... | Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public synchronized String makeCompactString() { StringBuilder builder = new StringBuilder(); boolean first = true; for(Group group: this){ for(Counter counter: group) { if (first) { first = false; } else { builder.append(','); } builder.append(group... | Counters extends AbstractCounters<Counters.Counter, Counters.Group> { public synchronized String makeCompactString() { StringBuilder builder = new StringBuilder(); boolean first = true; for(Group group: this){ for(Counter counter: group) { if (first) { first = false; } else { builder.append(','); } builder.append(group... |
@Test public void testGetRootQueues() throws IOException, InterruptedException { final ClientRMProtocol applicationsManager = Mockito.mock(ClientRMProtocol.class); GetQueueInfoResponse response = Mockito.mock(GetQueueInfoResponse.class); org.apache.hadoop.yarn.api.records.QueueInfo queueInfo = Mockito.mock(org.apache.h... | public QueueInfo[] getRootQueues() throws IOException, InterruptedException { return TypeConverter.fromYarnQueueInfo(super.getRootQueueInfos(), this.conf); } | ResourceMgrDelegate extends YarnClientImpl { public QueueInfo[] getRootQueues() throws IOException, InterruptedException { return TypeConverter.fromYarnQueueInfo(super.getRootQueueInfos(), this.conf); } } | ResourceMgrDelegate extends YarnClientImpl { public QueueInfo[] getRootQueues() throws IOException, InterruptedException { return TypeConverter.fromYarnQueueInfo(super.getRootQueueInfos(), this.conf); } ResourceMgrDelegate(YarnConfiguration conf); } | ResourceMgrDelegate extends YarnClientImpl { public QueueInfo[] getRootQueues() throws IOException, InterruptedException { return TypeConverter.fromYarnQueueInfo(super.getRootQueueInfos(), this.conf); } ResourceMgrDelegate(YarnConfiguration conf); void cancelDelegationToken(Token<DelegationTokenIdentifier> arg0); TaskT... | ResourceMgrDelegate extends YarnClientImpl { public QueueInfo[] getRootQueues() throws IOException, InterruptedException { return TypeConverter.fromYarnQueueInfo(super.getRootQueueInfos(), this.conf); } ResourceMgrDelegate(YarnConfiguration conf); void cancelDelegationToken(Token<DelegationTokenIdentifier> arg0); TaskT... |
@Test public void tesAllJobs() throws Exception { final ClientRMProtocol applicationsManager = Mockito.mock(ClientRMProtocol.class); GetAllApplicationsResponse allApplicationsResponse = Records .newRecord(GetAllApplicationsResponse.class); List<ApplicationReport> applications = new ArrayList<ApplicationReport>(); appli... | public JobStatus[] getAllJobs() throws IOException, InterruptedException { return TypeConverter.fromYarnApps(super.getApplicationList(), this.conf); } | ResourceMgrDelegate extends YarnClientImpl { public JobStatus[] getAllJobs() throws IOException, InterruptedException { return TypeConverter.fromYarnApps(super.getApplicationList(), this.conf); } } | ResourceMgrDelegate extends YarnClientImpl { public JobStatus[] getAllJobs() throws IOException, InterruptedException { return TypeConverter.fromYarnApps(super.getApplicationList(), this.conf); } ResourceMgrDelegate(YarnConfiguration conf); } | ResourceMgrDelegate extends YarnClientImpl { public JobStatus[] getAllJobs() throws IOException, InterruptedException { return TypeConverter.fromYarnApps(super.getApplicationList(), this.conf); } ResourceMgrDelegate(YarnConfiguration conf); void cancelDelegationToken(Token<DelegationTokenIdentifier> arg0); TaskTrackerI... | ResourceMgrDelegate extends YarnClientImpl { public JobStatus[] getAllJobs() throws IOException, InterruptedException { return TypeConverter.fromYarnApps(super.getApplicationList(), this.conf); } ResourceMgrDelegate(YarnConfiguration conf); void cancelDelegationToken(Token<DelegationTokenIdentifier> arg0); TaskTrackerI... |
@Test public void testUnknownAppInRM() throws Exception { MRClientProtocol historyServerProxy = mock(MRClientProtocol.class); when(historyServerProxy.getJobReport(getJobReportRequest())).thenReturn( getJobReportResponse()); ClientServiceDelegate clientServiceDelegate = getClientServiceDelegate( historyServerProxy, getR... | public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJobReportResponse) invoke... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... |
@Test public void testDegenerateRegions() throws Exception { String table = "tableDegenerateRegions"; try { setupTable(table); assertNoErrors(doFsck(conf,false)); assertEquals(ROWKEYS.length, countRows()); HRegionInfo hriDupe = createRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("B"), Bytes.toBytes("B")); TEST_U... | 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 testRemoteExceptionFromHistoryServer() throws Exception { MRClientProtocol historyServerProxy = mock(MRClientProtocol.class); when(historyServerProxy.getJobReport(getJobReportRequest())).thenThrow( RPCUtil.getRemoteException("Job ID doesnot Exist")); ResourceMgrDelegate rm = mock(ResourceMgrDelegate.c... | public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJobReportResponse) invoke... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... |
@Test public void testRetriesOnConnectionFailure() throws Exception { MRClientProtocol historyServerProxy = mock(MRClientProtocol.class); when(historyServerProxy.getJobReport(getJobReportRequest())).thenThrow( new RuntimeException("1")).thenThrow(new RuntimeException("2")) .thenReturn(getJobReportResponse()); ResourceM... | public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJobReportResponse) invoke... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... |
@Test public void testHistoryServerNotConfigured() throws Exception { ClientServiceDelegate clientServiceDelegate = getClientServiceDelegate( null, getRMDelegate()); JobStatus jobStatus = clientServiceDelegate.getJobStatus(oldJobId); Assert.assertEquals("N/A", jobStatus.getUsername()); Assert.assertEquals(JobStatus.Sta... | public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJobReportResponse) invoke... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... |
@Test public void testJobReportFromHistoryServer() throws Exception { MRClientProtocol historyServerProxy = mock(MRClientProtocol.class); when(historyServerProxy.getJobReport(getJobReportRequest())).thenReturn( getJobReportResponseFromHistoryServer()); ResourceMgrDelegate rm = mock(ResourceMgrDelegate.class); when(rm.g... | public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJobReportResponse) invoke... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... |
@Test public void testCountersFromHistoryServer() throws Exception { MRClientProtocol historyServerProxy = mock(MRClientProtocol.class); when(historyServerProxy.getCounters(getCountersRequest())).thenReturn( getCountersResponseFromHistoryServer()); ResourceMgrDelegate rm = mock(ResourceMgrDelegate.class); when(rm.getAp... | public org.apache.hadoop.mapreduce.Counters getJobCounters(JobID arg0) throws IOException, InterruptedException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobID = TypeConverter.toYarn(arg0); GetCountersRequest request = recordFactory.newRecordInstance(GetCountersRequest.class); request.setJobId(jobID); Counters... | ClientServiceDelegate { public org.apache.hadoop.mapreduce.Counters getJobCounters(JobID arg0) throws IOException, InterruptedException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobID = TypeConverter.toYarn(arg0); GetCountersRequest request = recordFactory.newRecordInstance(GetCountersRequest.class); request.s... | ClientServiceDelegate { public org.apache.hadoop.mapreduce.Counters getJobCounters(JobID arg0) throws IOException, InterruptedException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobID = TypeConverter.toYarn(arg0); GetCountersRequest request = recordFactory.newRecordInstance(GetCountersRequest.class); request.s... | ClientServiceDelegate { public org.apache.hadoop.mapreduce.Counters getJobCounters(JobID arg0) throws IOException, InterruptedException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobID = TypeConverter.toYarn(arg0); GetCountersRequest request = recordFactory.newRecordInstance(GetCountersRequest.class); request.s... | ClientServiceDelegate { public org.apache.hadoop.mapreduce.Counters getJobCounters(JobID arg0) throws IOException, InterruptedException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobID = TypeConverter.toYarn(arg0); GetCountersRequest request = recordFactory.newRecordInstance(GetCountersRequest.class); request.s... |
@Test public void testRMDownRestoreForJobStatusBeforeGetAMReport() throws IOException { Configuration conf = new YarnConfiguration(); conf.setInt(MRJobConfig.MR_CLIENT_MAX_RETRIES, 3); conf.set(MRConfig.FRAMEWORK_NAME, MRConfig.YARN_FRAMEWORK_NAME); conf.setBoolean(MRJobConfig.JOB_AM_ACCESS_DISABLED, !isAMReachableFrom... | public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJobReportResponse) invoke... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... | ClientServiceDelegate { public JobStatus getJobStatus(JobID oldJobID) throws IOException { org.apache.hadoop.mapreduce.v2.api.records.JobId jobId = TypeConverter.toYarn(oldJobID); GetJobReportRequest request = recordFactory.newRecordInstance(GetJobReportRequest.class); request.setJobId(jobId); JobReport report = ((GetJ... |
@Test public void testHandle() throws Exception { LOG.info("STARTING testHandle"); YarnRPC mockRpc = mock(YarnRPC.class); AppContext mockContext = mock(AppContext.class); @SuppressWarnings("rawtypes") EventHandler mockEventHandler = mock(EventHandler.class); when(mockContext.getEventHandler()).thenReturn(mockEventHandl... | @Override public void handle(ContainerLauncherEvent event) { try { eventQueue.put(event); this.allNodes.add(event.getContainerMgrAddress()); } catch (InterruptedException e) { throw new YarnException(e); } } | ContainerLauncherImpl extends AbstractService implements
ContainerLauncher { @Override public void handle(ContainerLauncherEvent event) { try { eventQueue.put(event); this.allNodes.add(event.getContainerMgrAddress()); } catch (InterruptedException e) { throw new YarnException(e); } } } | ContainerLauncherImpl extends AbstractService implements
ContainerLauncher { @Override public void handle(ContainerLauncherEvent event) { try { eventQueue.put(event); this.allNodes.add(event.getContainerMgrAddress()); } catch (InterruptedException e) { throw new YarnException(e); } } ContainerLauncherImpl(AppContex... | ContainerLauncherImpl extends AbstractService implements
ContainerLauncher { @Override public void handle(ContainerLauncherEvent event) { try { eventQueue.put(event); this.allNodes.add(event.getContainerMgrAddress()); } catch (InterruptedException e) { throw new YarnException(e); } } ContainerLauncherImpl(AppContex... | ContainerLauncherImpl extends AbstractService implements
ContainerLauncher { @Override public void handle(ContainerLauncherEvent event) { try { eventQueue.put(event); this.allNodes.add(event.getContainerMgrAddress()); } catch (InterruptedException e) { throw new YarnException(e); } } ContainerLauncherImpl(AppContex... |
@Test public void testAM() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("mapreduce") .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject json = response.getEnt... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... |
@Test public void testContainedRegionOverlap() throws Exception { String table = "tableContainedRegionOverlap"; try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); HRegionInfo hriOverlap = createRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("A2"), Bytes.toBytes("B")); TEST_UTIL.getHBaseCluster().... | 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 testRemoveUnsetConstraint() throws Throwable { HTableDescriptor desc = new HTableDescriptor("table"); Constraints.remove(desc); Constraints.remove(desc, AlsoWorks.class); } | public static void remove(HTableDescriptor desc) { disable(desc); List<ImmutableBytesWritable> keys = new ArrayList<ImmutableBytesWritable>(); for (Map.Entry<ImmutableBytesWritable, ImmutableBytesWritable> e : desc .getValues().entrySet()) { String key = Bytes.toString((e.getKey().get())); String[] className = CONSTRAI... | Constraints { public static void remove(HTableDescriptor desc) { disable(desc); List<ImmutableBytesWritable> keys = new ArrayList<ImmutableBytesWritable>(); for (Map.Entry<ImmutableBytesWritable, ImmutableBytesWritable> e : desc .getValues().entrySet()) { String key = Bytes.toString((e.getKey().get())); String[] classN... | Constraints { public static void remove(HTableDescriptor desc) { disable(desc); List<ImmutableBytesWritable> keys = new ArrayList<ImmutableBytesWritable>(); for (Map.Entry<ImmutableBytesWritable, ImmutableBytesWritable> e : desc .getValues().entrySet()) { String key = Bytes.toString((e.getKey().get())); String[] classN... | Constraints { public static void remove(HTableDescriptor desc) { disable(desc); List<ImmutableBytesWritable> keys = new ArrayList<ImmutableBytesWritable>(); for (Map.Entry<ImmutableBytesWritable, ImmutableBytesWritable> e : desc .getValues().entrySet()) { String key = Bytes.toString((e.getKey().get())); String[] classN... | Constraints { public static void remove(HTableDescriptor desc) { disable(desc); List<ImmutableBytesWritable> keys = new ArrayList<ImmutableBytesWritable>(); for (Map.Entry<ImmutableBytesWritable, ImmutableBytesWritable> e : desc .getValues().entrySet()) { String key = Bytes.toString((e.getKey().get())); String[] classN... |
@Test public void testAMSlash() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("mapreduce/") .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject json = response.... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... |
@Test public void testAMDefault() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("mapreduce/") .get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject json = response.getEntity(JSONObject.class); asse... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... |
@Test public void testAMXML() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("mapreduce") .accept(MediaType.APPLICATION_XML).get(ClientResponse.class); assertEquals(MediaType.APPLICATION_XML_TYPE, response.getType()); String xml = response.getEntity(... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... |
@Test public void testInfo() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("mapreduce") .path("info").accept(MediaType.APPLICATION_JSON) .get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject json =... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... |
@Test public void testInfoSlash() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("mapreduce") .path("info/").accept(MediaType.APPLICATION_JSON) .get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject ... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... |
@Test public void testInfoDefault() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("mapreduce") .path("info/").get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject json = response.getEntity(JSONObje... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... |
@Test public void testInfoXML() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("mapreduce") .path("info/").accept(MediaType.APPLICATION_XML) .get(ClientResponse.class); assertEquals(MediaType.APPLICATION_XML_TYPE, response.getType()); String xml = re... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... |
@Test public void testInvalidUri() throws JSONException, Exception { WebResource r = resource(); String responseStr = ""; try { responseStr = r.path("ws").path("v1").path("mapreduce").path("bogus") .accept(MediaType.APPLICATION_JSON).get(String.class); fail("should have thrown exception on invalid uri"); } catch (Unifo... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... |
@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 AppInfo get() { return getAppInfo(); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... |
@Test public void testInvalidAccept() throws JSONException, Exception { WebResource r = resource(); String responseStr = ""; try { responseStr = r.path("ws").path("v1").path("mapreduce") .accept(MediaType.TEXT_PLAIN).get(String.class); fail("should have thrown exception on invalid uri"); } catch (UniformInterfaceExcept... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); } | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... | AMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public AppInfo get() { return getAppInfo(); } @Inject AMWebServices(final App app, final AppContext context); static Job getJobFromJobIdString(String jid, AppContext appCtx); static Task getTaskFromTaskIdString(String tid, Job jo... |
@Test public void testOverlapAndOrphan() throws Exception { String table = "tableOverlapAndOrphan"; try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); TEST_UTIL.getHBaseAdmin().disableTable(table); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("A"), Bytes.toBytes("B"), true, true, false, t... | 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 testMRAppMasterForDifferentUser() throws IOException, InterruptedException { String applicationAttemptIdStr = "appattempt_1317529182569_0004_000001"; String containerIdStr = "container_1317529182569_0004_000001_1"; String stagingDir = "/tmp/staging"; String userName = "TestAppMasterUser"; ApplicationA... | protected static void initAndStartAppMaster(final MRAppMaster appMaster, final JobConf conf, String jobUserName) throws IOException, InterruptedException { UserGroupInformation.setConfiguration(conf); Credentials credentials = UserGroupInformation.getCurrentUser().getCredentials(); UserGroupInformation appMasterUgi = U... | MRAppMaster extends CompositeService { protected static void initAndStartAppMaster(final MRAppMaster appMaster, final JobConf conf, String jobUserName) throws IOException, InterruptedException { UserGroupInformation.setConfiguration(conf); Credentials credentials = UserGroupInformation.getCurrentUser().getCredentials()... | MRAppMaster extends CompositeService { protected static void initAndStartAppMaster(final MRAppMaster appMaster, final JobConf conf, String jobUserName) throws IOException, InterruptedException { UserGroupInformation.setConfiguration(conf); Credentials credentials = UserGroupInformation.getCurrentUser().getCredentials()... | MRAppMaster extends CompositeService { protected static void initAndStartAppMaster(final MRAppMaster appMaster, final JobConf conf, String jobUserName) throws IOException, InterruptedException { UserGroupInformation.setConfiguration(conf); Credentials credentials = UserGroupInformation.getCurrentUser().getCredentials()... | MRAppMaster extends CompositeService { protected static void initAndStartAppMaster(final MRAppMaster appMaster, final JobConf conf, String jobUserName) throws IOException, InterruptedException { UserGroupInformation.setConfiguration(conf); Credentials credentials = UserGroupInformation.getCurrentUser().getCredentials()... |
@Test public void testKillSuccessfulTask() { LOG.info("--- START: testKillSuccesfulTask ---"); mockTask = createMockTask(TaskType.MAP); TaskId taskId = getNewTaskID(); scheduleTaskAttempt(taskId); launchTaskAttempt(getLastAttempt().getAttemptId()); commitTaskAttempt(getLastAttempt().getAttemptId()); mockTask.handle(new... | @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.getType(), event); } catch (InvalidStateTransitonExce... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... |
@Test public void testTaskProgress() { LOG.info("--- START: testTaskProgress ---"); mockTask = createMockTask(TaskType.MAP); TaskId taskId = getNewTaskID(); scheduleTaskAttempt(taskId); float progress = 0f; assert(mockTask.getProgress() == progress); launchTaskAttempt(getLastAttempt().getAttemptId()); progress = 50f; u... | @Override public float getProgress() { readLock.lock(); try { TaskAttempt bestAttempt = selectBestAttempt(); if (bestAttempt == null) { return 0f; } return bestAttempt.getProgress(); } finally { readLock.unlock(); } } | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public float getProgress() { readLock.lock(); try { TaskAttempt bestAttempt = selectBestAttempt(); if (bestAttempt == null) { return 0f; } return bestAttempt.getProgress(); } finally { readLock.unlock(); } } } | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public float getProgress() { readLock.lock(); try { TaskAttempt bestAttempt = selectBestAttempt(); if (bestAttempt == null) { return 0f; } return bestAttempt.getProgress(); } finally { readLock.unlock(); } } TaskImpl(JobId jobId, TaskType taskType, int parti... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public float getProgress() { readLock.lock(); try { TaskAttempt bestAttempt = selectBestAttempt(); if (bestAttempt == null) { return 0f; } return bestAttempt.getProgress(); } finally { readLock.unlock(); } } TaskImpl(JobId jobId, TaskType taskType, int parti... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public float getProgress() { readLock.lock(); try { TaskAttempt bestAttempt = selectBestAttempt(); if (bestAttempt == null) { return 0f; } return bestAttempt.getProgress(); } finally { readLock.unlock(); } } TaskImpl(JobId jobId, TaskType taskType, int parti... |
@Test public void testSpeculativeMapFetchFailure() { mockTask = createMockTask(TaskType.MAP); runSpeculativeTaskAttemptSucceeds(TaskEventType.T_ATTEMPT_KILLED); assertEquals(2, taskAttempts.size()); mockTask.handle(new TaskTAttemptEvent(taskAttempts.get(1).getAttemptId(), TaskEventType.T_ATTEMPT_FAILED)); assertTaskSch... | @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.getType(), event); } catch (InvalidStateTransitonExce... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... |
@Test public void testSpeculativeMapMultipleSucceedFetchFailure() { mockTask = createMockTask(TaskType.MAP); runSpeculativeTaskAttemptSucceeds(TaskEventType.T_ATTEMPT_SUCCEEDED); assertEquals(2, taskAttempts.size()); mockTask.handle(new TaskTAttemptEvent(taskAttempts.get(1).getAttemptId(), TaskEventType.T_ATTEMPT_FAILE... | @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.getType(), event); } catch (InvalidStateTransitonExce... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... |
@Test public void testSpeculativeMapFailedFetchFailure() { mockTask = createMockTask(TaskType.MAP); runSpeculativeTaskAttemptSucceeds(TaskEventType.T_ATTEMPT_FAILED); assertEquals(2, taskAttempts.size()); mockTask.handle(new TaskTAttemptEvent(taskAttempts.get(1).getAttemptId(), TaskEventType.T_ATTEMPT_FAILED)); assertT... | @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.getType(), event); } catch (InvalidStateTransitonExce... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... | TaskImpl implements Task, EventHandler<TaskEvent> { @Override public void handle(TaskEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing " + event.getTaskID() + " of type " + event.getType()); } try { writeLock.lock(); TaskStateInternal oldState = getInternalState(); try { stateMachine.doTransition(event.g... |
@Test public void testCheckAccess() { String user1 = System.getProperty("user.name"); String user2 = user1 + "1234"; UserGroupInformation ugi1 = UserGroupInformation.createRemoteUser(user1); UserGroupInformation ugi2 = UserGroupInformation.createRemoteUser(user2); JobID jobID = JobID.forName("job_1234567890000_0001"); ... | @Override public boolean checkAccess(UserGroupInformation callerUGI, JobACL jobOperation) { AccessControlList jobACL = jobACLs.get(jobOperation); if (jobACL == null) { return true; } return aclsManager.checkAccess(callerUGI, jobOperation, username, jobACL); } | JobImpl implements org.apache.hadoop.mapreduce.v2.app.job.Job,
EventHandler<JobEvent> { @Override public boolean checkAccess(UserGroupInformation callerUGI, JobACL jobOperation) { AccessControlList jobACL = jobACLs.get(jobOperation); if (jobACL == null) { return true; } return aclsManager.checkAccess(callerUGI, jobO... | JobImpl implements org.apache.hadoop.mapreduce.v2.app.job.Job,
EventHandler<JobEvent> { @Override public boolean checkAccess(UserGroupInformation callerUGI, JobACL jobOperation) { AccessControlList jobACL = jobACLs.get(jobOperation); if (jobACL == null) { return true; } return aclsManager.checkAccess(callerUGI, jobO... | JobImpl implements org.apache.hadoop.mapreduce.v2.app.job.Job,
EventHandler<JobEvent> { @Override public boolean checkAccess(UserGroupInformation callerUGI, JobACL jobOperation) { AccessControlList jobACL = jobACLs.get(jobOperation); if (jobACL == null) { return true; } return aclsManager.checkAccess(callerUGI, jobO... | JobImpl implements org.apache.hadoop.mapreduce.v2.app.job.Job,
EventHandler<JobEvent> { @Override public boolean checkAccess(UserGroupInformation callerUGI, JobACL jobOperation) { AccessControlList jobACL = jobACLs.get(jobOperation); if (jobACL == null) { return true; } return aclsManager.checkAccess(callerUGI, jobO... |
@Test public void testGetTask() throws IOException { AppContext appCtx = mock(AppContext.class); JobTokenSecretManager secret = mock(JobTokenSecretManager.class); TaskHeartbeatHandler hbHandler = mock(TaskHeartbeatHandler.class); MockTaskAttemptListenerImpl listener = new MockTaskAttemptListenerImpl(appCtx, secret, hbH... | @Override public JvmTask getTask(JvmContext context) throws IOException { JVMId jvmId = context.jvmId; LOG.info("JVM with ID : " + jvmId + " asked for a task"); JvmTask jvmTask = null; WrappedJvmID wJvmID = new WrappedJvmID(jvmId.getJobId(), jvmId.isMap, jvmId.getId()); if (!jvmIDToActiveAttemptMap.containsKey(wJvmID))... | TaskAttemptListenerImpl extends CompositeService implements TaskUmbilicalProtocol, TaskAttemptListener { @Override public JvmTask getTask(JvmContext context) throws IOException { JVMId jvmId = context.jvmId; LOG.info("JVM with ID : " + jvmId + " asked for a task"); JvmTask jvmTask = null; WrappedJvmID wJvmID = new Wrap... | TaskAttemptListenerImpl extends CompositeService implements TaskUmbilicalProtocol, TaskAttemptListener { @Override public JvmTask getTask(JvmContext context) throws IOException { JVMId jvmId = context.jvmId; LOG.info("JVM with ID : " + jvmId + " asked for a task"); JvmTask jvmTask = null; WrappedJvmID wJvmID = new Wrap... | TaskAttemptListenerImpl extends CompositeService implements TaskUmbilicalProtocol, TaskAttemptListener { @Override public JvmTask getTask(JvmContext context) throws IOException { JVMId jvmId = context.jvmId; LOG.info("JVM with ID : " + jvmId + " asked for a task"); JvmTask jvmTask = null; WrappedJvmID wJvmID = new Wrap... | TaskAttemptListenerImpl extends CompositeService implements TaskUmbilicalProtocol, TaskAttemptListener { @Override public JvmTask getTask(JvmContext context) throws IOException { JVMId jvmId = context.jvmId; LOG.info("JVM with ID : " + jvmId + " asked for a task"); JvmTask jvmTask = null; WrappedJvmID wJvmID = new Wrap... |
@Test public void testGetMapCompletionEvents() throws IOException { TaskAttemptCompletionEvent[] empty = {}; TaskAttemptCompletionEvent[] taskEvents = { createTce(0, true, TaskAttemptCompletionEventStatus.OBSOLETE), createTce(1, false, TaskAttemptCompletionEventStatus.FAILED), createTce(2, true, TaskAttemptCompletionEv... | @Override public MapTaskCompletionEventsUpdate getMapCompletionEvents( JobID jobIdentifier, int startIndex, int maxEvents, TaskAttemptID taskAttemptID) throws IOException { LOG.info("MapCompletionEvents request from " + taskAttemptID.toString() + ". startIndex " + startIndex + " maxEvents " + maxEvents); boolean should... | TaskAttemptListenerImpl extends CompositeService implements TaskUmbilicalProtocol, TaskAttemptListener { @Override public MapTaskCompletionEventsUpdate getMapCompletionEvents( JobID jobIdentifier, int startIndex, int maxEvents, TaskAttemptID taskAttemptID) throws IOException { LOG.info("MapCompletionEvents request from... | TaskAttemptListenerImpl extends CompositeService implements TaskUmbilicalProtocol, TaskAttemptListener { @Override public MapTaskCompletionEventsUpdate getMapCompletionEvents( JobID jobIdentifier, int startIndex, int maxEvents, TaskAttemptID taskAttemptID) throws IOException { LOG.info("MapCompletionEvents request from... | TaskAttemptListenerImpl extends CompositeService implements TaskUmbilicalProtocol, TaskAttemptListener { @Override public MapTaskCompletionEventsUpdate getMapCompletionEvents( JobID jobIdentifier, int startIndex, int maxEvents, TaskAttemptID taskAttemptID) throws IOException { LOG.info("MapCompletionEvents request from... | TaskAttemptListenerImpl extends CompositeService implements TaskUmbilicalProtocol, TaskAttemptListener { @Override public MapTaskCompletionEventsUpdate getMapCompletionEvents( JobID jobIdentifier, int startIndex, int maxEvents, TaskAttemptID taskAttemptID) throws IOException { LOG.info("MapCompletionEvents request from... |
@Test public void testCoveredStartKey() throws Exception { String table = "tableCoveredStartKey"; try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); HRegionInfo hriOverlap = createRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("A2"), Bytes.toBytes("B2")); TEST_UTIL.getHBaseCluster().getMaster().a... | 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 testLoading() throws Exception { Configuration conf = new Configuration(); MiniDFSCluster cluster = new MiniDFSCluster(conf, 2, true, null); FileSystem fs = cluster.getFileSystem(); ByteArrayOutputStream out = new ByteArrayOutputStream(); TypedBytesOutput tboutput = new TypedBytesOutput(new DataOutput... | public int run(String[] args) throws Exception { if (args.length == 0) { System.err.println("Too few arguments!"); printUsage(); return 1; } Path path = new Path(args[0]); FileSystem fs = path.getFileSystem(getConf()); if (fs.exists(path)) { System.err.println("given path exists already!"); return -1; } TypedBytesInput... | LoadTypedBytes implements Tool { public int run(String[] args) throws Exception { if (args.length == 0) { System.err.println("Too few arguments!"); printUsage(); return 1; } Path path = new Path(args[0]); FileSystem fs = path.getFileSystem(getConf()); if (fs.exists(path)) { System.err.println("given path exists already... | LoadTypedBytes implements Tool { public int run(String[] args) throws Exception { if (args.length == 0) { System.err.println("Too few arguments!"); printUsage(); return 1; } Path path = new Path(args[0]); FileSystem fs = path.getFileSystem(getConf()); if (fs.exists(path)) { System.err.println("given path exists already... | LoadTypedBytes implements Tool { public int run(String[] args) throws Exception { if (args.length == 0) { System.err.println("Too few arguments!"); printUsage(); return 1; } Path path = new Path(args[0]); FileSystem fs = path.getFileSystem(getConf()); if (fs.exists(path)) { System.err.println("given path exists already... | LoadTypedBytes implements Tool { public int run(String[] args) throws Exception { if (args.length == 0) { System.err.println("Too few arguments!"); printUsage(); return 1; } Path path = new Path(args[0]); FileSystem fs = path.getFileSystem(getConf()); if (fs.exists(path)) { System.err.println("given path exists already... |
@Test public void testDumping() throws Exception { Configuration conf = new Configuration(); MiniDFSCluster cluster = new MiniDFSCluster(conf, 2, true, null); FileSystem fs = cluster.getFileSystem(); PrintStream psBackup = System.out; ByteArrayOutputStream out = new ByteArrayOutputStream(); PrintStream psOut = new Prin... | public int run(String[] args) throws Exception { if (args.length == 0) { System.err.println("Too few arguments!"); printUsage(); return 1; } Path pattern = new Path(args[0]); FileSystem fs = pattern.getFileSystem(getConf()); fs.setVerifyChecksum(true); for (Path p : FileUtil.stat2Paths(fs.globStatus(pattern), pattern))... | DumpTypedBytes implements Tool { public int run(String[] args) throws Exception { if (args.length == 0) { System.err.println("Too few arguments!"); printUsage(); return 1; } Path pattern = new Path(args[0]); FileSystem fs = pattern.getFileSystem(getConf()); fs.setVerifyChecksum(true); for (Path p : FileUtil.stat2Paths(... | DumpTypedBytes implements Tool { public int run(String[] args) throws Exception { if (args.length == 0) { System.err.println("Too few arguments!"); printUsage(); return 1; } Path pattern = new Path(args[0]); FileSystem fs = pattern.getFileSystem(getConf()); fs.setVerifyChecksum(true); for (Path p : FileUtil.stat2Paths(... | DumpTypedBytes implements Tool { public int run(String[] args) throws Exception { if (args.length == 0) { System.err.println("Too few arguments!"); printUsage(); return 1; } Path pattern = new Path(args[0]); FileSystem fs = pattern.getFileSystem(getConf()); fs.setVerifyChecksum(true); for (Path p : FileUtil.stat2Paths(... | DumpTypedBytes implements Tool { public int run(String[] args) throws Exception { if (args.length == 0) { System.err.println("Too few arguments!"); printUsage(); return 1; } Path pattern = new Path(args[0]); FileSystem fs = pattern.getFileSystem(getConf()); fs.setVerifyChecksum(true); for (Path p : FileUtil.stat2Paths(... |
@Test public void testRegionHole() throws Exception { String table = "tableRegionHole"; try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); TEST_UTIL.getHBaseAdmin().disableTable(table); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("B"), Bytes.toBytes("C"), true, true, true); TEST_UTIL.get... | 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 testRelativePath() throws Exception { fs.delete(archivePath, true); final Path sub1 = new Path(inputPath, "dir1"); fs.mkdirs(sub1); createFile(sub1, "a", fs); final FsShell shell = new FsShell(conf); final List<String> originalPaths = lsr(shell, "input"); System.out.println("originalPath: " + original... | public int run(String[] args) throws Exception { try { Path parentPath = null; List<Path> srcPaths = new ArrayList<Path>(); Path destPath = null; String archiveName = null; if (args.length < 5) { System.out.println(usage); throw new IOException("Invalid usage."); } if (!"-archiveName".equals(args[0])) { System.out.prin... | HadoopArchives implements Tool { public int run(String[] args) throws Exception { try { Path parentPath = null; List<Path> srcPaths = new ArrayList<Path>(); Path destPath = null; String archiveName = null; if (args.length < 5) { System.out.println(usage); throw new IOException("Invalid usage."); } if (!"-archiveName".e... | HadoopArchives implements Tool { public int run(String[] args) throws Exception { try { Path parentPath = null; List<Path> srcPaths = new ArrayList<Path>(); Path destPath = null; String archiveName = null; if (args.length < 5) { System.out.println(usage); throw new IOException("Invalid usage."); } if (!"-archiveName".e... | HadoopArchives implements Tool { public int run(String[] args) throws Exception { try { Path parentPath = null; List<Path> srcPaths = new ArrayList<Path>(); Path destPath = null; String archiveName = null; if (args.length < 5) { System.out.println(usage); throw new IOException("Invalid usage."); } if (!"-archiveName".e... | HadoopArchives implements Tool { public int run(String[] args) throws Exception { try { Path parentPath = null; List<Path> srcPaths = new ArrayList<Path>(); Path destPath = null; String archiveName = null; if (args.length < 5) { System.out.println(usage); throw new IOException("Invalid usage."); } if (!"-archiveName".e... |
@Test public void testPathWithSpaces() throws Exception { fs.delete(archivePath, true); createFile(inputPath, "c c", fs); final Path sub1 = new Path(inputPath, "sub 1"); fs.mkdirs(sub1); createFile(sub1, "file x y z", fs); createFile(sub1, "file", fs); createFile(sub1, "x", fs); createFile(sub1, "y", fs); createFile(su... | public int run(String[] args) throws Exception { try { Path parentPath = null; List<Path> srcPaths = new ArrayList<Path>(); Path destPath = null; String archiveName = null; if (args.length < 5) { System.out.println(usage); throw new IOException("Invalid usage."); } if (!"-archiveName".equals(args[0])) { System.out.prin... | HadoopArchives implements Tool { public int run(String[] args) throws Exception { try { Path parentPath = null; List<Path> srcPaths = new ArrayList<Path>(); Path destPath = null; String archiveName = null; if (args.length < 5) { System.out.println(usage); throw new IOException("Invalid usage."); } if (!"-archiveName".e... | HadoopArchives implements Tool { public int run(String[] args) throws Exception { try { Path parentPath = null; List<Path> srcPaths = new ArrayList<Path>(); Path destPath = null; String archiveName = null; if (args.length < 5) { System.out.println(usage); throw new IOException("Invalid usage."); } if (!"-archiveName".e... | HadoopArchives implements Tool { public int run(String[] args) throws Exception { try { Path parentPath = null; List<Path> srcPaths = new ArrayList<Path>(); Path destPath = null; String archiveName = null; if (args.length < 5) { System.out.println(usage); throw new IOException("Invalid usage."); } if (!"-archiveName".e... | HadoopArchives implements Tool { public int run(String[] args) throws Exception { try { Path parentPath = null; List<Path> srcPaths = new ArrayList<Path>(); Path destPath = null; String archiveName = null; if (args.length < 5) { System.out.println(usage); throw new IOException("Invalid usage."); } if (!"-archiveName".e... |
@Test public void testPreserve() { try { FileSystem fs = FileSystem.get(config); EnumSet<FileAttribute> attributes = EnumSet.noneOf(FileAttribute.class); Path path = new Path("/tmp/abc"); Path src = new Path("/tmp/src"); fs.mkdirs(path); fs.mkdirs(src); FileStatus srcStatus = fs.getFileStatus(src); FsPermission noPerm ... | public static void preserve(FileSystem targetFS, Path path, FileStatus srcFileStatus, EnumSet<FileAttribute> attributes) throws IOException { FileStatus targetFileStatus = targetFS.getFileStatus(path); String group = targetFileStatus.getGroup(); String user = targetFileStatus.getOwner(); boolean chown = false; if (attr... | DistCpUtils { public static void preserve(FileSystem targetFS, Path path, FileStatus srcFileStatus, EnumSet<FileAttribute> attributes) throws IOException { FileStatus targetFileStatus = targetFS.getFileStatus(path); String group = targetFileStatus.getGroup(); String user = targetFileStatus.getOwner(); boolean chown = f... | DistCpUtils { public static void preserve(FileSystem targetFS, Path path, FileStatus srcFileStatus, EnumSet<FileAttribute> attributes) throws IOException { FileStatus targetFileStatus = targetFS.getFileStatus(path); String group = targetFileStatus.getGroup(); String user = targetFileStatus.getOwner(); boolean chown = f... | DistCpUtils { public static void preserve(FileSystem targetFS, Path path, FileStatus srcFileStatus, EnumSet<FileAttribute> attributes) throws IOException { FileStatus targetFileStatus = targetFS.getFileStatus(path); String group = targetFileStatus.getGroup(); String user = targetFileStatus.getOwner(); boolean chown = f... | DistCpUtils { public static void preserve(FileSystem targetFS, Path path, FileStatus srcFileStatus, EnumSet<FileAttribute> attributes) throws IOException { FileStatus targetFileStatus = targetFS.getFileStatus(path); String group = targetFileStatus.getGroup(); String user = targetFileStatus.getOwner(); boolean chown = f... |
@Test public void testHDFSRegioninfoMissing() throws Exception { String table = "tableHDFSRegioininfoMissing"; try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); TEST_UTIL.getHBaseAdmin().disableTable(table); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("B"), Bytes.toBytes("C"), true, tru... | 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 testRead() { File tmpFile; File outFile; try { tmpFile = createFile(1024); outFile = createFile(); tmpFile.deleteOnExit(); outFile.deleteOnExit(); long maxBandwidth = copyAndAssert(tmpFile, outFile, 0, 1, -1, CB.BUFFER); copyAndAssert(tmpFile, outFile, maxBandwidth, 20, 0, CB.BUFFER); copyAndAssert(tm... | @Override public int read() throws IOException { throttle(); int data = rawStream.read(); if (data != -1) { bytesRead++; } return data; } | ThrottledInputStream extends InputStream { @Override public int read() throws IOException { throttle(); int data = rawStream.read(); if (data != -1) { bytesRead++; } return data; } } | ThrottledInputStream extends InputStream { @Override public int read() throws IOException { throttle(); int data = rawStream.read(); if (data != -1) { bytesRead++; } return data; } ThrottledInputStream(InputStream rawStream); ThrottledInputStream(InputStream rawStream, long maxBytesPerSec); } | ThrottledInputStream extends InputStream { @Override public int read() throws IOException { throttle(); int data = rawStream.read(); if (data != -1) { bytesRead++; } return data; } ThrottledInputStream(InputStream rawStream); ThrottledInputStream(InputStream rawStream, long maxBytesPerSec); @Override int read(); @Over... | ThrottledInputStream extends InputStream { @Override public int read() throws IOException { throttle(); int data = rawStream.read(); if (data != -1) { bytesRead++; } return data; } ThrottledInputStream(InputStream rawStream); ThrottledInputStream(InputStream rawStream, long maxBytesPerSec); @Override int read(); @Over... |
@Test public void testNotInMetaOrDeployedHole() throws Exception { String table = "tableNotInMetaOrDeployedHole"; try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); TEST_UTIL.getHBaseAdmin().disableTable(table); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("B"), Bytes.toBytes("C"), true, ... | 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 testParseMaps() { DistCpOptions options = OptionsParser.parse(new String[] { "hdfs: "hdfs: Assert.assertEquals(options.getMaxMaps(), DistCpConstants.DEFAULT_MAPS); options = OptionsParser.parse(new String[] { "-m", "1", "hdfs: "hdfs: Assert.assertEquals(options.getMaxMaps(), 1); try { OptionsParser.pa... | public static DistCpOptions parse(String args[]) throws IllegalArgumentException { CommandLineParser parser = new CustomParser(); CommandLine command; try { command = parser.parse(cliOptions, args, true); } catch (ParseException e) { throw new IllegalArgumentException("Unable to parse arguments. " + Arrays.toString(arg... | OptionsParser { public static DistCpOptions parse(String args[]) throws IllegalArgumentException { CommandLineParser parser = new CustomParser(); CommandLine command; try { command = parser.parse(cliOptions, args, true); } catch (ParseException e) { throw new IllegalArgumentException("Unable to parse arguments. " + Arr... | OptionsParser { public static DistCpOptions parse(String args[]) throws IllegalArgumentException { CommandLineParser parser = new CustomParser(); CommandLine command; try { command = parser.parse(cliOptions, args, true); } catch (ParseException e) { throw new IllegalArgumentException("Unable to parse arguments. " + Arr... | OptionsParser { public static DistCpOptions parse(String args[]) throws IllegalArgumentException { CommandLineParser parser = new CustomParser(); CommandLine command; try { command = parser.parse(cliOptions, args, true); } catch (ParseException e) { throw new IllegalArgumentException("Unable to parse arguments. " + Arr... | OptionsParser { public static DistCpOptions parse(String args[]) throws IllegalArgumentException { CommandLineParser parser = new CustomParser(); CommandLine command; try { command = parser.parse(cliOptions, args, true); } catch (ParseException e) { throw new IllegalArgumentException("Unable to parse arguments. " + Arr... |
@Test public void testNotInMetaHole() throws Exception { String table = "tableNotInMetaHole"; try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); TEST_UTIL.getHBaseAdmin().disableTable(table); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("B"), Bytes.toBytes("C"), false, true, false); TEST_... | 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 testPreserve() { DistCpOptions options = OptionsParser.parse(new String[] { "-f", "hdfs: "hdfs: Assert.assertFalse(options.shouldPreserve(FileAttribute.BLOCKSIZE)); Assert.assertFalse(options.shouldPreserve(FileAttribute.REPLICATION)); Assert.assertFalse(options.shouldPreserve(FileAttribute.PERMISSION... | public static DistCpOptions parse(String args[]) throws IllegalArgumentException { CommandLineParser parser = new CustomParser(); CommandLine command; try { command = parser.parse(cliOptions, args, true); } catch (ParseException e) { throw new IllegalArgumentException("Unable to parse arguments. " + Arrays.toString(arg... | OptionsParser { public static DistCpOptions parse(String args[]) throws IllegalArgumentException { CommandLineParser parser = new CustomParser(); CommandLine command; try { command = parser.parse(cliOptions, args, true); } catch (ParseException e) { throw new IllegalArgumentException("Unable to parse arguments. " + Arr... | OptionsParser { public static DistCpOptions parse(String args[]) throws IllegalArgumentException { CommandLineParser parser = new CustomParser(); CommandLine command; try { command = parser.parse(cliOptions, args, true); } catch (ParseException e) { throw new IllegalArgumentException("Unable to parse arguments. " + Arr... | OptionsParser { public static DistCpOptions parse(String args[]) throws IllegalArgumentException { CommandLineParser parser = new CustomParser(); CommandLine command; try { command = parser.parse(cliOptions, args, true); } catch (ParseException e) { throw new IllegalArgumentException("Unable to parse arguments. " + Arr... | OptionsParser { public static DistCpOptions parse(String args[]) throws IllegalArgumentException { CommandLineParser parser = new CustomParser(); CommandLine command; try { command = parser.parse(cliOptions, args, true); } catch (ParseException e) { throw new IllegalArgumentException("Unable to parse arguments. " + Arr... |
@Test public void testNotInHdfs() throws Exception { String table = "tableNotInHdfs"; try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); TEST_UTIL.getHBaseAdmin().flush(table); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("B"), Bytes.toBytes("C"), false, false, true); HBaseFsck hbck = doF... | 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 testNoCommitAction() { TaskAttemptContext taskAttemptContext = getTaskAttemptContext(config); JobContext jobContext = new JobContextImpl(taskAttemptContext.getConfiguration(), taskAttemptContext.getTaskAttemptID().getJobID()); try { OutputCommitter committer = new CopyCommitter(null, taskAttemptContex... | @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes != null && !attributes.isEmpty()) { preserve... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... |
@Test public void testPreserveStatus() { TaskAttemptContext taskAttemptContext = getTaskAttemptContext(config); JobContext jobContext = new JobContextImpl(taskAttemptContext.getConfiguration(), taskAttemptContext.getTaskAttemptID().getJobID()); Configuration conf = jobContext.getConfiguration(); String sourceBase; Stri... | @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes != null && !attributes.isEmpty()) { preserve... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... |
@Test public void testDeleteMissing() { TaskAttemptContext taskAttemptContext = getTaskAttemptContext(config); JobContext jobContext = new JobContextImpl(taskAttemptContext.getConfiguration(), taskAttemptContext.getTaskAttemptID().getJobID()); Configuration conf = jobContext.getConfiguration(); String sourceBase; Strin... | private void deleteMissing(Configuration conf) throws IOException { LOG.info("-delete option is enabled. About to remove entries from " + "target that are missing in source"); Path sourceListing = new Path(conf.get(DistCpConstants.CONF_LABEL_LISTING_FILE_PATH)); FileSystem clusterFS = sourceListing.getFileSystem(conf);... | CopyCommitter extends FileOutputCommitter { private void deleteMissing(Configuration conf) throws IOException { LOG.info("-delete option is enabled. About to remove entries from " + "target that are missing in source"); Path sourceListing = new Path(conf.get(DistCpConstants.CONF_LABEL_LISTING_FILE_PATH)); FileSystem cl... | CopyCommitter extends FileOutputCommitter { private void deleteMissing(Configuration conf) throws IOException { LOG.info("-delete option is enabled. About to remove entries from " + "target that are missing in source"); Path sourceListing = new Path(conf.get(DistCpConstants.CONF_LABEL_LISTING_FILE_PATH)); FileSystem cl... | CopyCommitter extends FileOutputCommitter { private void deleteMissing(Configuration conf) throws IOException { LOG.info("-delete option is enabled. About to remove entries from " + "target that are missing in source"); Path sourceListing = new Path(conf.get(DistCpConstants.CONF_LABEL_LISTING_FILE_PATH)); FileSystem cl... | CopyCommitter extends FileOutputCommitter { private void deleteMissing(Configuration conf) throws IOException { LOG.info("-delete option is enabled. About to remove entries from " + "target that are missing in source"); Path sourceListing = new Path(conf.get(DistCpConstants.CONF_LABEL_LISTING_FILE_PATH)); FileSystem cl... |
@Test public void testDeleteMissingFlatInterleavedFiles() { TaskAttemptContext taskAttemptContext = getTaskAttemptContext(config); JobContext jobContext = new JobContextImpl(taskAttemptContext.getConfiguration(), taskAttemptContext.getTaskAttemptID().getJobID()); Configuration conf = jobContext.getConfiguration(); Stri... | @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes != null && !attributes.isEmpty()) { preserve... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... |
@Test public void testAtomicCommitMissingFinal() { TaskAttemptContext taskAttemptContext = getTaskAttemptContext(config); JobContext jobContext = new JobContextImpl(taskAttemptContext.getConfiguration(), taskAttemptContext.getTaskAttemptID().getJobID()); Configuration conf = jobContext.getConfiguration(); String workPa... | @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes != null && !attributes.isEmpty()) { preserve... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... |
@Test public void testAtomicCommitExistingFinal() { TaskAttemptContext taskAttemptContext = getTaskAttemptContext(config); JobContext jobContext = new JobContextImpl(taskAttemptContext.getConfiguration(), taskAttemptContext.getTaskAttemptID().getJobID()); Configuration conf = jobContext.getConfiguration(); String workP... | @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes != null && !attributes.isEmpty()) { preserve... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... | CopyCommitter extends FileOutputCommitter { @Override public void commitJob(JobContext jobContext) throws IOException { Configuration conf = jobContext.getConfiguration(); super.commitJob(jobContext); cleanupTempFiles(jobContext); String attributes = conf.get(DistCpConstants.CONF_LABEL_PRESERVE_STATUS); if (attributes ... |
@Test public void testNoHdfsTable() throws Exception { String table = "NoHdfsTable"; setupTable(table); assertEquals(ROWKEYS.length, countRows()); TEST_UTIL.getHBaseAdmin().flush(table); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(""), Bytes.toBytes("A"), false, false, true); deleteRegion(conf, tbl.getTa... | 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 testCreateInstance() { ResourceCalculatorProcessTree tree; tree = ResourceCalculatorProcessTree.getResourceCalculatorProcessTree("1", EmptyProcessTree.class, new Configuration()); assertNotNull(tree); assertThat(tree, instanceOf(EmptyProcessTree.class)); } | public static ResourceCalculatorProcessTree getResourceCalculatorProcessTree( String pid, Class<? extends ResourceCalculatorProcessTree> clazz, Configuration conf) { if (clazz != null) { try { Constructor <? extends ResourceCalculatorProcessTree> c = clazz.getConstructor(String.class); ResourceCalculatorProcessTree rct... | ResourceCalculatorProcessTree extends Configured { public static ResourceCalculatorProcessTree getResourceCalculatorProcessTree( String pid, Class<? extends ResourceCalculatorProcessTree> clazz, Configuration conf) { if (clazz != null) { try { Constructor <? extends ResourceCalculatorProcessTree> c = clazz.getConstruct... | ResourceCalculatorProcessTree extends Configured { public static ResourceCalculatorProcessTree getResourceCalculatorProcessTree( String pid, Class<? extends ResourceCalculatorProcessTree> clazz, Configuration conf) { if (clazz != null) { try { Constructor <? extends ResourceCalculatorProcessTree> c = clazz.getConstruct... | ResourceCalculatorProcessTree extends Configured { public static ResourceCalculatorProcessTree getResourceCalculatorProcessTree( String pid, Class<? extends ResourceCalculatorProcessTree> clazz, Configuration conf) { if (clazz != null) { try { Constructor <? extends ResourceCalculatorProcessTree> c = clazz.getConstruct... | ResourceCalculatorProcessTree extends Configured { public static ResourceCalculatorProcessTree getResourceCalculatorProcessTree( String pid, Class<? extends ResourceCalculatorProcessTree> clazz, Configuration conf) { if (clazz != null) { try { Constructor <? extends ResourceCalculatorProcessTree> c = clazz.getConstruct... |
@Test public void testCreatedInstanceConfigured() { ResourceCalculatorProcessTree tree; Configuration conf = new Configuration(); tree = ResourceCalculatorProcessTree.getResourceCalculatorProcessTree("1", EmptyProcessTree.class, conf); assertNotNull(tree); assertThat(tree.getConf(), sameInstance(conf)); } | public static ResourceCalculatorProcessTree getResourceCalculatorProcessTree( String pid, Class<? extends ResourceCalculatorProcessTree> clazz, Configuration conf) { if (clazz != null) { try { Constructor <? extends ResourceCalculatorProcessTree> c = clazz.getConstructor(String.class); ResourceCalculatorProcessTree rct... | ResourceCalculatorProcessTree extends Configured { public static ResourceCalculatorProcessTree getResourceCalculatorProcessTree( String pid, Class<? extends ResourceCalculatorProcessTree> clazz, Configuration conf) { if (clazz != null) { try { Constructor <? extends ResourceCalculatorProcessTree> c = clazz.getConstruct... | ResourceCalculatorProcessTree extends Configured { public static ResourceCalculatorProcessTree getResourceCalculatorProcessTree( String pid, Class<? extends ResourceCalculatorProcessTree> clazz, Configuration conf) { if (clazz != null) { try { Constructor <? extends ResourceCalculatorProcessTree> c = clazz.getConstruct... | ResourceCalculatorProcessTree extends Configured { public static ResourceCalculatorProcessTree getResourceCalculatorProcessTree( String pid, Class<? extends ResourceCalculatorProcessTree> clazz, Configuration conf) { if (clazz != null) { try { Constructor <? extends ResourceCalculatorProcessTree> c = clazz.getConstruct... | ResourceCalculatorProcessTree extends Configured { public static ResourceCalculatorProcessTree getResourceCalculatorProcessTree( String pid, Class<? extends ResourceCalculatorProcessTree> clazz, Configuration conf) { if (clazz != null) { try { Constructor <? extends ResourceCalculatorProcessTree> c = clazz.getConstruct... |
@Test public void testDestroyProcessTree() throws IOException { String pid = "100"; File procfsRootDir = new File(TEST_ROOT_DIR, "proc"); try { setupProcfsRootDir(procfsRootDir); createProcessTree(pid, procfsRootDir.getAbsolutePath()); Assert.assertTrue(ProcfsBasedProcessTree.checkPidPgrpidForMatch( pid, procfsRootDir.... | @Override public boolean checkPidPgrpidForMatch() { return checkPidPgrpidForMatch(pid, PROCFS); } | ProcfsBasedProcessTree extends ResourceCalculatorProcessTree { @Override public boolean checkPidPgrpidForMatch() { return checkPidPgrpidForMatch(pid, PROCFS); } } | ProcfsBasedProcessTree extends ResourceCalculatorProcessTree { @Override public boolean checkPidPgrpidForMatch() { return checkPidPgrpidForMatch(pid, PROCFS); } ProcfsBasedProcessTree(String pid); ProcfsBasedProcessTree(String pid, String procfsDir); } | ProcfsBasedProcessTree extends ResourceCalculatorProcessTree { @Override public boolean checkPidPgrpidForMatch() { return checkPidPgrpidForMatch(pid, PROCFS); } ProcfsBasedProcessTree(String pid); ProcfsBasedProcessTree(String pid, String procfsDir); static boolean isAvailable(); @Override void updateProcessTree(); @O... | ProcfsBasedProcessTree extends ResourceCalculatorProcessTree { @Override public boolean checkPidPgrpidForMatch() { return checkPidPgrpidForMatch(pid, PROCFS); } ProcfsBasedProcessTree(String pid); ProcfsBasedProcessTree(String pid, String procfsDir); static boolean isAvailable(); @Override void updateProcessTree(); @O... |
@Test public void testContainerIdNull() throws URISyntaxException { assertNull(ConverterUtils.toString((ContainerId)null)); } | public static String toString(ApplicationId appId) { return appId.toString(); } | ConverterUtils { public static String toString(ApplicationId appId) { return appId.toString(); } } | ConverterUtils { public static String toString(ApplicationId appId) { return appId.toString(); } } | ConverterUtils { public static String toString(ApplicationId appId) { return appId.toString(); } static Path getPathFromYarnURL(URL url); static Map<String, String> convertToString(
Map<CharSequence, CharSequence> env); static URL getYarnUrlFromPath(Path path); static URL getYarnUrlFromURI(URI uri); static Strin... | ConverterUtils { public static String toString(ApplicationId appId) { return appId.toString(); } static Path getPathFromYarnURL(URL url); static Map<String, String> convertToString(
Map<CharSequence, CharSequence> env); static URL getYarnUrlFromPath(Path path); static URL getYarnUrlFromURI(URI uri); static Strin... |
@Test public void testConstructUrlsFromClasspath() throws Exception { File file = new File(testDir, "file"); assertTrue("Create file", file.createNewFile()); File dir = new File(testDir, "dir"); assertTrue("Make dir", dir.mkdir()); File jarsDir = new File(testDir, "jarsdir"); assertTrue("Make jarsDir", jarsDir.mkdir())... | @VisibleForTesting static URL[] constructUrlsFromClasspath(String classpath) throws MalformedURLException { List<URL> urls = new ArrayList<URL>(); for (String element : Splitter.on(File.pathSeparator).split(classpath)) { if (element.endsWith("/*")) { String dir = element.substring(0, element.length() - 1); File[] files... | ApplicationClassLoader extends URLClassLoader { @VisibleForTesting static URL[] constructUrlsFromClasspath(String classpath) throws MalformedURLException { List<URL> urls = new ArrayList<URL>(); for (String element : Splitter.on(File.pathSeparator).split(classpath)) { if (element.endsWith("/*")) { String dir = element.... | ApplicationClassLoader extends URLClassLoader { @VisibleForTesting static URL[] constructUrlsFromClasspath(String classpath) throws MalformedURLException { List<URL> urls = new ArrayList<URL>(); for (String element : Splitter.on(File.pathSeparator).split(classpath)) { if (element.endsWith("/*")) { String dir = element.... | ApplicationClassLoader extends URLClassLoader { @VisibleForTesting static URL[] constructUrlsFromClasspath(String classpath) throws MalformedURLException { List<URL> urls = new ArrayList<URL>(); for (String element : Splitter.on(File.pathSeparator).split(classpath)) { if (element.endsWith("/*")) { String dir = element.... | ApplicationClassLoader extends URLClassLoader { @VisibleForTesting static URL[] constructUrlsFromClasspath(String classpath) throws MalformedURLException { List<URL> urls = new ArrayList<URL>(); for (String element : Splitter.on(File.pathSeparator).split(classpath)) { if (element.endsWith("/*")) { String dir = element.... |
@Test public void testIsSystemClass() { assertFalse(isSystemClass("org.example.Foo", null)); assertTrue(isSystemClass("org.example.Foo", classes("org.example.Foo"))); assertTrue(isSystemClass("/org.example.Foo", classes("org.example.Foo"))); assertTrue(isSystemClass("org.example.Foo", classes("org.example."))); assertT... | @VisibleForTesting static boolean isSystemClass(String name, List<String> systemClasses) { if (systemClasses != null) { String canonicalName = name.replace('/', '.'); while (canonicalName.startsWith(".")) { canonicalName=canonicalName.substring(1); } for (String c : systemClasses) { boolean result = true; if (c.startsW... | ApplicationClassLoader extends URLClassLoader { @VisibleForTesting static boolean isSystemClass(String name, List<String> systemClasses) { if (systemClasses != null) { String canonicalName = name.replace('/', '.'); while (canonicalName.startsWith(".")) { canonicalName=canonicalName.substring(1); } for (String c : syste... | ApplicationClassLoader extends URLClassLoader { @VisibleForTesting static boolean isSystemClass(String name, List<String> systemClasses) { if (systemClasses != null) { String canonicalName = name.replace('/', '.'); while (canonicalName.startsWith(".")) { canonicalName=canonicalName.substring(1); } for (String c : syste... | ApplicationClassLoader extends URLClassLoader { @VisibleForTesting static boolean isSystemClass(String name, List<String> systemClasses) { if (systemClasses != null) { String canonicalName = name.replace('/', '.'); while (canonicalName.startsWith(".")) { canonicalName=canonicalName.substring(1); } for (String c : syste... | ApplicationClassLoader extends URLClassLoader { @VisibleForTesting static boolean isSystemClass(String name, List<String> systemClasses) { if (systemClasses != null) { String canonicalName = name.replace('/', '.'); while (canonicalName.startsWith(".")) { canonicalName=canonicalName.substring(1); } for (String c : syste... |
@Test public void testGetResource() throws IOException { URL testJar = makeTestJar().toURI().toURL(); ClassLoader currentClassLoader = getClass().getClassLoader(); ClassLoader appClassloader = new ApplicationClassLoader( new URL[] { testJar }, currentClassLoader, null); assertNull("Resource should be null for current c... | @Override public URL getResource(String name) { URL url = null; if (!isSystemClass(name, systemClasses)) { url= findResource(name); if (url == null && name.startsWith("/")) { if (LOG.isDebugEnabled()) { LOG.debug("Remove leading / off " + name); } url= findResource(name.substring(1)); } } if (url == null) { url= parent... | ApplicationClassLoader extends URLClassLoader { @Override public URL getResource(String name) { URL url = null; if (!isSystemClass(name, systemClasses)) { url= findResource(name); if (url == null && name.startsWith("/")) { if (LOG.isDebugEnabled()) { LOG.debug("Remove leading / off " + name); } url= findResource(name.s... | ApplicationClassLoader extends URLClassLoader { @Override public URL getResource(String name) { URL url = null; if (!isSystemClass(name, systemClasses)) { url= findResource(name); if (url == null && name.startsWith("/")) { if (LOG.isDebugEnabled()) { LOG.debug("Remove leading / off " + name); } url= findResource(name.s... | ApplicationClassLoader extends URLClassLoader { @Override public URL getResource(String name) { URL url = null; if (!isSystemClass(name, systemClasses)) { url= findResource(name); if (url == null && name.startsWith("/")) { if (LOG.isDebugEnabled()) { LOG.debug("Remove leading / off " + name); } url= findResource(name.s... | ApplicationClassLoader extends URLClassLoader { @Override public URL getResource(String name) { URL url = null; if (!isSystemClass(name, systemClasses)) { url= findResource(name); if (url == null && name.startsWith("/")) { if (LOG.isDebugEnabled()) { LOG.debug("Remove leading / off " + name); } url= findResource(name.s... |
@Test public void testGetTableArchivePath() { assertNotNull(HFileArchiveUtil.getTableArchivePath(new Path("table"))); assertNotNull(HFileArchiveUtil.getTableArchivePath(new Path("root", new Path("table")))); } | public static Path getTableArchivePath(Path tabledir) { Path root = tabledir.getParent(); return getTableArchivePath(root, tabledir.getName()); } | HFileArchiveUtil { public static Path getTableArchivePath(Path tabledir) { Path root = tabledir.getParent(); return getTableArchivePath(root, tabledir.getName()); } } | HFileArchiveUtil { public static Path getTableArchivePath(Path tabledir) { Path root = tabledir.getParent(); return getTableArchivePath(root, tabledir.getName()); } private HFileArchiveUtil(); } | HFileArchiveUtil { public static Path getTableArchivePath(Path tabledir) { Path root = tabledir.getParent(); return getTableArchivePath(root, tabledir.getName()); } private HFileArchiveUtil(); static Path getStoreArchivePath(final Configuration conf, final String tableName,
final String regionName, final String ... | HFileArchiveUtil { public static Path getTableArchivePath(Path tabledir) { Path root = tabledir.getParent(); return getTableArchivePath(root, tabledir.getName()); } private HFileArchiveUtil(); static Path getStoreArchivePath(final Configuration conf, final String tableName,
final String regionName, final String ... |
@Test public void testCreate() { WebApp app = WebApps.$for(this).start(); app.stop(); } | public void stop() { try { checkNotNull(httpServer, "httpServer").stop(); checkNotNull(guiceFilter, "guiceFilter").destroy(); } catch (Exception e) { throw new WebAppException(e); } } | WebApp extends ServletModule { public void stop() { try { checkNotNull(httpServer, "httpServer").stop(); checkNotNull(guiceFilter, "guiceFilter").destroy(); } catch (Exception e) { throw new WebAppException(e); } } } | WebApp extends ServletModule { public void stop() { try { checkNotNull(httpServer, "httpServer").stop(); checkNotNull(guiceFilter, "guiceFilter").destroy(); } catch (Exception e) { throw new WebAppException(e); } } } | WebApp extends ServletModule { public void stop() { try { checkNotNull(httpServer, "httpServer").stop(); checkNotNull(guiceFilter, "guiceFilter").destroy(); } catch (Exception e) { throw new WebAppException(e); } } @Provides HttpServer httpServer(); InetSocketAddress getListenerAddress(); int port(); void stop(); void... | WebApp extends ServletModule { public void stop() { try { checkNotNull(httpServer, "httpServer").stop(); checkNotNull(guiceFilter, "guiceFilter").destroy(); } catch (Exception e) { throw new WebAppException(e); } } @Provides HttpServer httpServer(); InetSocketAddress getListenerAddress(); int port(); void stop(); void... |
@Test public void testDefaultRoutes() throws Exception { WebApp app = WebApps.$for("test", this).start(); String baseUrl = baseUrl(app); try { assertEquals("foo", getContent(baseUrl +"test/foo").trim()); assertEquals("foo", getContent(baseUrl +"test/foo/index").trim()); assertEquals("bar", getContent(baseUrl +"test/foo... | public void stop() { try { checkNotNull(httpServer, "httpServer").stop(); checkNotNull(guiceFilter, "guiceFilter").destroy(); } catch (Exception e) { throw new WebAppException(e); } } | WebApp extends ServletModule { public void stop() { try { checkNotNull(httpServer, "httpServer").stop(); checkNotNull(guiceFilter, "guiceFilter").destroy(); } catch (Exception e) { throw new WebAppException(e); } } } | WebApp extends ServletModule { public void stop() { try { checkNotNull(httpServer, "httpServer").stop(); checkNotNull(guiceFilter, "guiceFilter").destroy(); } catch (Exception e) { throw new WebAppException(e); } } } | WebApp extends ServletModule { public void stop() { try { checkNotNull(httpServer, "httpServer").stop(); checkNotNull(guiceFilter, "guiceFilter").destroy(); } catch (Exception e) { throw new WebAppException(e); } } @Provides HttpServer httpServer(); InetSocketAddress getListenerAddress(); int port(); void stop(); void... | WebApp extends ServletModule { public void stop() { try { checkNotNull(httpServer, "httpServer").stop(); checkNotNull(guiceFilter, "guiceFilter").destroy(); } catch (Exception e) { throw new WebAppException(e); } } @Provides HttpServer httpServer(); InetSocketAddress getListenerAddress(); int port(); void stop(); void... |
@Test public void testInitTwice() throws Throwable { BreakableService svc = new BreakableService(); Configuration conf = new Configuration(); conf.set("test.init", "t"); ServiceOperations.init(svc, conf); try { ServiceOperations.init(svc, new Configuration()); fail("Expected a failure, got " + svc); } catch (IllegalSta... | public static void init(Service service, Configuration configuration) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.NOTINITED); service.init(configuration); } | ServiceOperations { public static void init(Service service, Configuration configuration) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.NOTINITED); service.init(configuration); } } | ServiceOperations { public static void init(Service service, Configuration configuration) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.NOTINITED); service.init(configuration); } private ServiceOperations(); } | ServiceOperations { public static void init(Service service, Configuration configuration) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.NOTINITED); service.init(configuration); } private ServiceOperations(); static void ensureCurrentState(Service.STATE state,
... | ServiceOperations { public static void init(Service service, Configuration configuration) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.NOTINITED); service.init(configuration); } private ServiceOperations(); static void ensureCurrentState(Service.STATE state,
... |
@Test public void testDeploy() throws Throwable { BreakableService svc = new BreakableService(); assertServiceStateCreated(svc); ServiceOperations.deploy(svc, new Configuration()); assertServiceStateStarted(svc); assertStateCount(svc, Service.STATE.INITED, 1); assertStateCount(svc, Service.STATE.STARTED, 1); ServiceOpe... | public static void deploy(Service service, Configuration configuration) { init(service, configuration); start(service); } | ServiceOperations { public static void deploy(Service service, Configuration configuration) { init(service, configuration); start(service); } } | ServiceOperations { public static void deploy(Service service, Configuration configuration) { init(service, configuration); start(service); } private ServiceOperations(); } | ServiceOperations { public static void deploy(Service service, Configuration configuration) { init(service, configuration); start(service); } private ServiceOperations(); static void ensureCurrentState(Service.STATE state,
Service.STATE expectedState); static void init(Service s... | ServiceOperations { public static void deploy(Service service, Configuration configuration) { init(service, configuration); start(service); } private ServiceOperations(); static void ensureCurrentState(Service.STATE state,
Service.STATE expectedState); static void init(Service s... |
@Test public void testDeployNotAtomic() throws Throwable { BreakableService svc = new BreakableService(false, true, false); try { ServiceOperations.deploy(svc, new Configuration()); fail("Expected a failure, got " + svc); } catch (BreakableService.BrokenLifecycleEvent expected) { } assertServiceStateInited(svc); assert... | public static void deploy(Service service, Configuration configuration) { init(service, configuration); start(service); } | ServiceOperations { public static void deploy(Service service, Configuration configuration) { init(service, configuration); start(service); } } | ServiceOperations { public static void deploy(Service service, Configuration configuration) { init(service, configuration); start(service); } private ServiceOperations(); } | ServiceOperations { public static void deploy(Service service, Configuration configuration) { init(service, configuration); start(service); } private ServiceOperations(); static void ensureCurrentState(Service.STATE state,
Service.STATE expectedState); static void init(Service s... | ServiceOperations { public static void deploy(Service service, Configuration configuration) { init(service, configuration); start(service); } private ServiceOperations(); static void ensureCurrentState(Service.STATE state,
Service.STATE expectedState); static void init(Service s... |
@Test public void testStopInit() throws Throwable { BreakableService svc = new BreakableService(); ServiceOperations.stop(svc); assertServiceStateCreated(svc); assertStateCount(svc, Service.STATE.STOPPED, 0); ServiceOperations.stop(svc); assertStateCount(svc, Service.STATE.STOPPED, 0); } | public static void stop(Service service) { if (service != null) { Service.STATE state = service.getServiceState(); if (state == Service.STATE.STARTED) { service.stop(); } } } | ServiceOperations { public static void stop(Service service) { if (service != null) { Service.STATE state = service.getServiceState(); if (state == Service.STATE.STARTED) { service.stop(); } } } } | ServiceOperations { public static void stop(Service service) { if (service != null) { Service.STATE state = service.getServiceState(); if (state == Service.STATE.STARTED) { service.stop(); } } } private ServiceOperations(); } | ServiceOperations { public static void stop(Service service) { if (service != null) { Service.STATE state = service.getServiceState(); if (state == Service.STATE.STARTED) { service.stop(); } } } private ServiceOperations(); static void ensureCurrentState(Service.STATE state,
Ser... | ServiceOperations { public static void stop(Service service) { if (service != null) { Service.STATE state = service.getServiceState(); if (state == Service.STATE.STARTED) { service.stop(); } } } private ServiceOperations(); static void ensureCurrentState(Service.STATE state,
Ser... |
@Test public void testDefaultRMWebUrl() throws Exception { YarnConfiguration conf = new YarnConfiguration(); String rmWebUrl = YarnConfiguration.getRMWebAppURL(conf); Assert.assertNotSame("RM Web Url is not correct", "http: rmWebUrl); } | public static String getRMWebAppURL(Configuration conf) { return JOINER.join("http: } | YarnConfiguration extends Configuration { public static String getRMWebAppURL(Configuration conf) { return JOINER.join("http: } } | YarnConfiguration extends Configuration { public static String getRMWebAppURL(Configuration conf) { return JOINER.join("http: } YarnConfiguration(); YarnConfiguration(Configuration conf); } | YarnConfiguration extends Configuration { public static String getRMWebAppURL(Configuration conf) { return JOINER.join("http: } YarnConfiguration(); YarnConfiguration(Configuration conf); static String getProxyHostAndPort(Configuration conf); static String getRMWebAppHostAndPort(Configuration conf); static String getR... | YarnConfiguration extends Configuration { public static String getRMWebAppURL(Configuration conf) { return JOINER.join("http: } YarnConfiguration(); YarnConfiguration(Configuration conf); static String getProxyHostAndPort(Configuration conf); static String getRMWebAppHostAndPort(Configuration conf); static String getR... |
@Test public void testGetArchivePath() throws Exception { Configuration conf = new Configuration(); FSUtils.setRootDir(conf, new Path("root")); assertNotNull(HFileArchiveUtil.getArchivePath(conf)); } | public static Path getArchivePath(Configuration conf) throws IOException { return getArchivePath(FSUtils.getRootDir(conf)); } | HFileArchiveUtil { public static Path getArchivePath(Configuration conf) throws IOException { return getArchivePath(FSUtils.getRootDir(conf)); } } | HFileArchiveUtil { public static Path getArchivePath(Configuration conf) throws IOException { return getArchivePath(FSUtils.getRootDir(conf)); } private HFileArchiveUtil(); } | HFileArchiveUtil { public static Path getArchivePath(Configuration conf) throws IOException { return getArchivePath(FSUtils.getRootDir(conf)); } private HFileArchiveUtil(); static Path getStoreArchivePath(final Configuration conf, final String tableName,
final String regionName, final String familyName); static ... | HFileArchiveUtil { public static Path getArchivePath(Configuration conf) throws IOException { return getArchivePath(FSUtils.getRootDir(conf)); } private HFileArchiveUtil(); static Path getStoreArchivePath(final Configuration conf, final String tableName,
final String regionName, final String familyName); static ... |
@Test public void testRMWebUrlSpecified() throws Exception { YarnConfiguration conf = new YarnConfiguration(); conf.set(YarnConfiguration.RM_WEBAPP_ADDRESS, "fortesting:24543"); conf.set(YarnConfiguration.RM_ADDRESS, "rmtesting:9999"); String rmWebUrl = YarnConfiguration.getRMWebAppURL(conf); String[] parts = rmWebUrl.... | public static String getRMWebAppURL(Configuration conf) { return JOINER.join("http: } | YarnConfiguration extends Configuration { public static String getRMWebAppURL(Configuration conf) { return JOINER.join("http: } } | YarnConfiguration extends Configuration { public static String getRMWebAppURL(Configuration conf) { return JOINER.join("http: } YarnConfiguration(); YarnConfiguration(Configuration conf); } | YarnConfiguration extends Configuration { public static String getRMWebAppURL(Configuration conf) { return JOINER.join("http: } YarnConfiguration(); YarnConfiguration(Configuration conf); static String getProxyHostAndPort(Configuration conf); static String getRMWebAppHostAndPort(Configuration conf); static String getR... | YarnConfiguration extends Configuration { public static String getRMWebAppURL(Configuration conf) { return JOINER.join("http: } YarnConfiguration(); YarnConfiguration(Configuration conf); static String getProxyHostAndPort(Configuration conf); static String getRMWebAppHostAndPort(Configuration conf); static String getR... |
@Test public void testContainerKill() throws Exception { if (!shouldRun()) { return; } final ContainerId sleepId = getNextContainerId(); Thread t = new Thread() { public void run() { try { runAndBlock(sleepId, "sleep", "100"); } catch (IOException e) { LOG.warn("Caught exception while running sleep",e); } }; }; t.setDa... | @Override public boolean signalContainer(String user, String pid, Signal signal) throws IOException { String[] command = new String[] { containerExecutorExe, user, Integer.toString(Commands.SIGNAL_CONTAINER.getValue()), pid, Integer.toString(signal.getValue()) }; ShellCommandExecutor shExec = new ShellCommandExecutor(c... | LinuxContainerExecutor extends ContainerExecutor { @Override public boolean signalContainer(String user, String pid, Signal signal) throws IOException { String[] command = new String[] { containerExecutorExe, user, Integer.toString(Commands.SIGNAL_CONTAINER.getValue()), pid, Integer.toString(signal.getValue()) }; Shell... | LinuxContainerExecutor extends ContainerExecutor { @Override public boolean signalContainer(String user, String pid, Signal signal) throws IOException { String[] command = new String[] { containerExecutorExe, user, Integer.toString(Commands.SIGNAL_CONTAINER.getValue()), pid, Integer.toString(signal.getValue()) }; Shell... | LinuxContainerExecutor extends ContainerExecutor { @Override public boolean signalContainer(String user, String pid, Signal signal) throws IOException { String[] command = new String[] { containerExecutorExe, user, Integer.toString(Commands.SIGNAL_CONTAINER.getValue()), pid, Integer.toString(signal.getValue()) }; Shell... | LinuxContainerExecutor extends ContainerExecutor { @Override public boolean signalContainer(String user, String pid, Signal signal) throws IOException { String[] command = new String[] { containerExecutorExe, user, Integer.toString(Commands.SIGNAL_CONTAINER.getValue()), pid, Integer.toString(signal.getValue()) }; Shell... |
@Test public void testNullPath() { String pid = null; try { pid = ProcessIdFileReader.getProcessId(null); fail("Expected an error to be thrown for null path"); } catch (Exception e) { } assert(pid == null); } | public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; try { File file = new F... | ProcessIdFileReader { public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; t... | ProcessIdFileReader { public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; t... | ProcessIdFileReader { public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; t... | ProcessIdFileReader { public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; t... |
@Test public void testSimpleGet() throws IOException { String rootDir = new File(System.getProperty( "test.build.data", "/tmp")).getAbsolutePath(); File testFile = null; try { testFile = new File(rootDir, "temp.txt"); PrintWriter fileWriter = new PrintWriter(testFile); fileWriter.println("56789"); fileWriter.close(); S... | public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; try { File file = new F... | ProcessIdFileReader { public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; t... | ProcessIdFileReader { public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; t... | ProcessIdFileReader { public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; t... | ProcessIdFileReader { public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; t... |
@Test public void testComplexGet() throws IOException { String rootDir = new File(System.getProperty( "test.build.data", "/tmp")).getAbsolutePath(); File testFile = null; try { testFile = new File(rootDir, "temp.txt"); PrintWriter fileWriter = new PrintWriter(testFile); fileWriter.println(" "); fileWriter.println(""); ... | public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; try { File file = new F... | ProcessIdFileReader { public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; t... | ProcessIdFileReader { public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; t... | ProcessIdFileReader { public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; t... | ProcessIdFileReader { public static String getProcessId(Path path) throws IOException { if (path == null) { throw new IOException("Trying to access process id from a null path"); } LOG.debug("Accessing pid from pid file " + path); String processId = null; FileReader fileReader = null; BufferedReader bufReader = null; t... |
@Test public void testInvalidUri() throws JSONException, Exception { WebResource r = resource(); String responseStr = ""; try { responseStr = r.path("ws").path("v1").path("node").path("bogus") .accept(MediaType.APPLICATION_JSON).get(String.class); fail("should have thrown exception on invalid uri"); } catch (UniformInt... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... |
@Test public void testInvalidAccept() throws JSONException, Exception { WebResource r = resource(); String responseStr = ""; try { responseStr = r.path("ws").path("v1").path("node") .accept(MediaType.TEXT_PLAIN).get(String.class); fail("should have thrown exception on invalid uri"); } catch (UniformInterfaceException u... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... |
@Test public void testInvalidUri2() throws JSONException, Exception { WebResource r = resource(); String responseStr = ""; try { responseStr = r.accept(MediaType.APPLICATION_JSON).get(String.class); fail("should have thrown exception on invalid uri"); } catch (UniformInterfaceException ue) { ClientResponse response = u... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... |
@Test public void testNode() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("node") .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject json = response.getEntity... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... |
@Test public void testNodeSlash() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("node/") .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject json = response.get... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... |
@Test public void testRegionArchiveDir() { Configuration conf = null; Path tableDir = new Path("table"); Path regionDir = new Path("region"); assertNotNull(HFileArchiveUtil.getRegionArchiveDir(conf, tableDir, regionDir)); } | public static Path getRegionArchiveDir(Configuration conf, Path tabledir, Path regiondir) { Path archiveDir = getTableArchivePath(tabledir); String encodedRegionName = regiondir.getName(); return HRegion.getRegionDir(archiveDir, encodedRegionName); } | HFileArchiveUtil { public static Path getRegionArchiveDir(Configuration conf, Path tabledir, Path regiondir) { Path archiveDir = getTableArchivePath(tabledir); String encodedRegionName = regiondir.getName(); return HRegion.getRegionDir(archiveDir, encodedRegionName); } } | HFileArchiveUtil { public static Path getRegionArchiveDir(Configuration conf, Path tabledir, Path regiondir) { Path archiveDir = getTableArchivePath(tabledir); String encodedRegionName = regiondir.getName(); return HRegion.getRegionDir(archiveDir, encodedRegionName); } private HFileArchiveUtil(); } | HFileArchiveUtil { public static Path getRegionArchiveDir(Configuration conf, Path tabledir, Path regiondir) { Path archiveDir = getTableArchivePath(tabledir); String encodedRegionName = regiondir.getName(); return HRegion.getRegionDir(archiveDir, encodedRegionName); } private HFileArchiveUtil(); static Path getStoreA... | HFileArchiveUtil { public static Path getRegionArchiveDir(Configuration conf, Path tabledir, Path regiondir) { Path archiveDir = getTableArchivePath(tabledir); String encodedRegionName = regiondir.getName(); return HRegion.getRegionDir(archiveDir, encodedRegionName); } private HFileArchiveUtil(); static Path getStoreA... |
@Test public void testNodeDefault() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("node") .get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject json = response.getEntity(JSONObject.class); verifyNo... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... |
@Test public void testNodeInfo() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("node").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 NodeInfo get() { return getNodeInfo(); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... |
@Test public void testNodeInfoSlash() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("node") .path("info/").accept(MediaType.APPLICATION_JSON) .get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); JSONObject j... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... |
@Test public void testNodeInfoDefault() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("node").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 NodeInfo get() { return getNodeInfo(); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... |
@Test public void testSingleNodesXML() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("node") .path("info/").accept(MediaType.APPLICATION_XML) .get(ClientResponse.class); assertEquals(MediaType.APPLICATION_XML_TYPE, response.getType()); String xml = ... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); } | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... | NMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public NodeInfo get() { return getNodeInfo(); } @Inject NMWebServices(final Context nm, final ResourceView view,
final WebApp webapp); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) NodeInfo get()... |
@Test public void testNMAuditLoggerWithIP() throws Exception { Configuration conf = new Configuration(); Server server = RPC.getServer(TestProtocol.class, new MyTestRPCServer(), "0.0.0.0", 0, 5, true, conf, null); server.start(); InetSocketAddress addr = NetUtils.getConnectAddress(server); TestProtocol proxy = (TestPro... | static void start(Keys key, String value, StringBuilder b) { b.append(key.name()).append(AuditConstants.KEY_VAL_SEPARATOR).append(value); } | NMAuditLogger { static void start(Keys key, String value, StringBuilder b) { b.append(key.name()).append(AuditConstants.KEY_VAL_SEPARATOR).append(value); } } | NMAuditLogger { static void start(Keys key, String value, StringBuilder b) { b.append(key.name()).append(AuditConstants.KEY_VAL_SEPARATOR).append(value); } } | NMAuditLogger { static void start(Keys key, String value, StringBuilder b) { b.append(key.name()).append(AuditConstants.KEY_VAL_SEPARATOR).append(value); } static void logSuccess(String user, String operation, String target,
ApplicationId appId, ContainerId containerId); static void logSuccess(String user, Strin... | NMAuditLogger { static void start(Keys key, String value, StringBuilder b) { b.append(key.name()).append(AuditConstants.KEY_VAL_SEPARATOR).append(value); } static void logSuccess(String user, String operation, String target,
ApplicationId appId, ContainerId containerId); static void logSuccess(String user, Strin... |
@Test public void testContainerExecutorInitCall() { NodeManager nm = new NodeManager(); YarnConfiguration conf = new YarnConfiguration(); conf.setClass(YarnConfiguration.NM_CONTAINER_EXECUTOR, InvalidContainerExecutor.class, ContainerExecutor.class); try { nm.init(conf); fail("Init should fail"); } catch (YarnException... | @Override public void init(Configuration conf) { conf.setBoolean(Dispatcher.DISPATCHER_EXIT_ON_ERROR_KEY, true); NMContainerTokenSecretManager containerTokenSecretManager = null; if (UserGroupInformation.isSecurityEnabled()) { LOG.info("Security is enabled on NodeManager. " + "Creating ContainerTokenSecretManager"); co... | NodeManager extends CompositeService implements
ServiceStateChangeListener { @Override public void init(Configuration conf) { conf.setBoolean(Dispatcher.DISPATCHER_EXIT_ON_ERROR_KEY, true); NMContainerTokenSecretManager containerTokenSecretManager = null; if (UserGroupInformation.isSecurityEnabled()) { LOG.info("Se... | NodeManager extends CompositeService implements
ServiceStateChangeListener { @Override public void init(Configuration conf) { conf.setBoolean(Dispatcher.DISPATCHER_EXIT_ON_ERROR_KEY, true); NMContainerTokenSecretManager containerTokenSecretManager = null; if (UserGroupInformation.isSecurityEnabled()) { LOG.info("Se... | NodeManager extends CompositeService implements
ServiceStateChangeListener { @Override public void init(Configuration conf) { conf.setBoolean(Dispatcher.DISPATCHER_EXIT_ON_ERROR_KEY, true); NMContainerTokenSecretManager containerTokenSecretManager = null; if (UserGroupInformation.isSecurityEnabled()) { LOG.info("Se... | NodeManager extends CompositeService implements
ServiceStateChangeListener { @Override public void init(Configuration conf) { conf.setBoolean(Dispatcher.DISPATCHER_EXIT_ON_ERROR_KEY, true); NMContainerTokenSecretManager containerTokenSecretManager = null; if (UserGroupInformation.isSecurityEnabled()) { LOG.info("Se... |
@Test public void testCreateDirectories() throws IOException { Configuration conf = new Configuration(); conf.set(CommonConfigurationKeys.FS_PERMISSIONS_UMASK_KEY, "077"); FileContext localFs = FileContext.getLocalFSFileContext(conf); String dirA = new File(testDir, "dirA").getPath(); String dirB = new File(dirA, "dirB... | synchronized boolean createNonExistentDirs(FileContext localFs, FsPermission perm) { boolean failed = false; for (final String dir : localDirs) { try { createDir(localFs, new Path(dir), perm); } catch (IOException e) { LOG.warn("Unable to create directory " + dir + " error " + e.getMessage() + ", removing from the list... | DirectoryCollection { synchronized boolean createNonExistentDirs(FileContext localFs, FsPermission perm) { boolean failed = false; for (final String dir : localDirs) { try { createDir(localFs, new Path(dir), perm); } catch (IOException e) { LOG.warn("Unable to create directory " + dir + " error " + e.getMessage() + ", ... | DirectoryCollection { synchronized boolean createNonExistentDirs(FileContext localFs, FsPermission perm) { boolean failed = false; for (final String dir : localDirs) { try { createDir(localFs, new Path(dir), perm); } catch (IOException e) { LOG.warn("Unable to create directory " + dir + " error " + e.getMessage() + ", ... | DirectoryCollection { synchronized boolean createNonExistentDirs(FileContext localFs, FsPermission perm) { boolean failed = false; for (final String dir : localDirs) { try { createDir(localFs, new Path(dir), perm); } catch (IOException e) { LOG.warn("Unable to create directory " + dir + " error " + e.getMessage() + ", ... | DirectoryCollection { synchronized boolean createNonExistentDirs(FileContext localFs, FsPermission perm) { boolean failed = false; for (final String dir : localDirs) { try { createDir(localFs, new Path(dir), perm); } catch (IOException e) { LOG.warn("Unable to create directory " + dir + " error " + e.getMessage() + ", ... |
@Test public void testValidPathsDirHandlerService() { Configuration conf = new YarnConfiguration(); String localDir1 = new File("file: String localDir2 = new File("hdfs: conf.set(YarnConfiguration.NM_LOCAL_DIRS, localDir1 + "," + localDir2); String logDir1 = new File("file: conf.set(YarnConfiguration.NM_LOG_DIRS, logDi... | @Override public void init(Configuration config) { Configuration conf = new Configuration(config); diskHealthCheckInterval = conf.getLong( YarnConfiguration.NM_DISK_HEALTH_CHECK_INTERVAL_MS, YarnConfiguration.DEFAULT_NM_DISK_HEALTH_CHECK_INTERVAL_MS); monitoringTimerTask = new MonitoringTimerTask(conf); isDiskHealthChe... | LocalDirsHandlerService extends AbstractService { @Override public void init(Configuration config) { Configuration conf = new Configuration(config); diskHealthCheckInterval = conf.getLong( YarnConfiguration.NM_DISK_HEALTH_CHECK_INTERVAL_MS, YarnConfiguration.DEFAULT_NM_DISK_HEALTH_CHECK_INTERVAL_MS); monitoringTimerTas... | LocalDirsHandlerService extends AbstractService { @Override public void init(Configuration config) { Configuration conf = new Configuration(config); diskHealthCheckInterval = conf.getLong( YarnConfiguration.NM_DISK_HEALTH_CHECK_INTERVAL_MS, YarnConfiguration.DEFAULT_NM_DISK_HEALTH_CHECK_INTERVAL_MS); monitoringTimerTas... | LocalDirsHandlerService extends AbstractService { @Override public void init(Configuration config) { Configuration conf = new Configuration(config); diskHealthCheckInterval = conf.getLong( YarnConfiguration.NM_DISK_HEALTH_CHECK_INTERVAL_MS, YarnConfiguration.DEFAULT_NM_DISK_HEALTH_CHECK_INTERVAL_MS); monitoringTimerTas... | LocalDirsHandlerService extends AbstractService { @Override public void init(Configuration config) { Configuration conf = new Configuration(config); diskHealthCheckInterval = conf.getLong( YarnConfiguration.NM_DISK_HEALTH_CHECK_INTERVAL_MS, YarnConfiguration.DEFAULT_NM_DISK_HEALTH_CHECK_INTERVAL_MS); monitoringTimerTas... |
@Test public void testStop() throws Exception { NonAggregatingLogHandler aggregatingLogHandler = new NonAggregatingLogHandler(null, null, null); aggregatingLogHandler.stop(); NonAggregatingLogHandlerWithMockExecutor logHandler = new NonAggregatingLogHandlerWithMockExecutor(null, null, null); logHandler.init(new Configu... | @Override public void stop() { if (sched != null) { sched.shutdown(); boolean isShutdown = false; try { isShutdown = sched.awaitTermination(10, TimeUnit.SECONDS); } catch (InterruptedException e) { sched.shutdownNow(); isShutdown = true; } if (!isShutdown) { sched.shutdownNow(); } } super.stop(); } | NonAggregatingLogHandler extends AbstractService implements
LogHandler { @Override public void stop() { if (sched != null) { sched.shutdown(); boolean isShutdown = false; try { isShutdown = sched.awaitTermination(10, TimeUnit.SECONDS); } catch (InterruptedException e) { sched.shutdownNow(); isShutdown = true; } if ... | NonAggregatingLogHandler extends AbstractService implements
LogHandler { @Override public void stop() { if (sched != null) { sched.shutdown(); boolean isShutdown = false; try { isShutdown = sched.awaitTermination(10, TimeUnit.SECONDS); } catch (InterruptedException e) { sched.shutdownNow(); isShutdown = true; } if ... | NonAggregatingLogHandler extends AbstractService implements
LogHandler { @Override public void stop() { if (sched != null) { sched.shutdown(); boolean isShutdown = false; try { isShutdown = sched.awaitTermination(10, TimeUnit.SECONDS); } catch (InterruptedException e) { sched.shutdownNow(); isShutdown = true; } if ... | NonAggregatingLogHandler extends AbstractService implements
LogHandler { @Override public void stop() { if (sched != null) { sched.shutdown(); boolean isShutdown = false; try { isShutdown = sched.awaitTermination(10, TimeUnit.SECONDS); } catch (InterruptedException e) { sched.shutdownNow(); isShutdown = true; } if ... |
@Test public void testGetStoreArchivePath(){ byte[] family = Bytes.toBytes("Family"); Path tabledir = new Path("table"); HRegionInfo region = new HRegionInfo(Bytes.toBytes("table")); Configuration conf = null; assertNotNull(HFileArchiveUtil.getStoreArchivePath(conf, region, tabledir, family)); conf = new Configuration(... | public static Path getStoreArchivePath(final Configuration conf, final String tableName, final String regionName, final String familyName) throws IOException { Path tableArchiveDir = getTableArchivePath(conf, tableName); return Store.getStoreHomedir(tableArchiveDir, regionName, familyName); } | HFileArchiveUtil { public static Path getStoreArchivePath(final Configuration conf, final String tableName, final String regionName, final String familyName) throws IOException { Path tableArchiveDir = getTableArchivePath(conf, tableName); return Store.getStoreHomedir(tableArchiveDir, regionName, familyName); } } | HFileArchiveUtil { public static Path getStoreArchivePath(final Configuration conf, final String tableName, final String regionName, final String familyName) throws IOException { Path tableArchiveDir = getTableArchivePath(conf, tableName); return Store.getStoreHomedir(tableArchiveDir, regionName, familyName); } private... | HFileArchiveUtil { public static Path getStoreArchivePath(final Configuration conf, final String tableName, final String regionName, final String familyName) throws IOException { Path tableArchiveDir = getTableArchivePath(conf, tableName); return Store.getStoreHomedir(tableArchiveDir, regionName, familyName); } private... | HFileArchiveUtil { public static Path getStoreArchivePath(final Configuration conf, final String tableName, final String regionName, final String familyName) throws IOException { Path tableArchiveDir = getTableArchivePath(conf, tableName); return Store.getStoreHomedir(tableArchiveDir, regionName, familyName); } private... |
@Test public void testSpecialCharSymlinks() throws IOException { File shellFile = null; File tempFile = null; String badSymlink = "foo@zz%_#*&!-+= bar()"; File symLinkFile = null; try { shellFile = new File(tmpDir, "hello.sh"); tempFile = new File(tmpDir, "temp.sh"); String timeoutCommand = "echo \"hello\""; PrintWrite... | static void writeLaunchEnv(OutputStream out, Map<String,String> environment, Map<Path,List<String>> resources, List<String> command) throws IOException { ShellScriptBuilder sb = new ShellScriptBuilder(); if (environment != null) { for (Map.Entry<String,String> env : environment.entrySet()) { sb.env(env.getKey().toStrin... | ContainerLaunch implements Callable<Integer> { static void writeLaunchEnv(OutputStream out, Map<String,String> environment, Map<Path,List<String>> resources, List<String> command) throws IOException { ShellScriptBuilder sb = new ShellScriptBuilder(); if (environment != null) { for (Map.Entry<String,String> env : enviro... | ContainerLaunch implements Callable<Integer> { static void writeLaunchEnv(OutputStream out, Map<String,String> environment, Map<Path,List<String>> resources, List<String> command) throws IOException { ShellScriptBuilder sb = new ShellScriptBuilder(); if (environment != null) { for (Map.Entry<String,String> env : enviro... | ContainerLaunch implements Callable<Integer> { static void writeLaunchEnv(OutputStream out, Map<String,String> environment, Map<Path,List<String>> resources, List<String> command) throws IOException { ShellScriptBuilder sb = new ShellScriptBuilder(); if (environment != null) { for (Map.Entry<String,String> env : enviro... | ContainerLaunch implements Callable<Integer> { static void writeLaunchEnv(OutputStream out, Map<String,String> environment, Map<Path,List<String>> resources, List<String> command) throws IOException { ShellScriptBuilder sb = new ShellScriptBuilder(); if (environment != null) { for (Map.Entry<String,String> env : enviro... |
@Test public void testAuxServices() { Configuration conf = new Configuration(); conf.setStrings(YarnConfiguration.NM_AUX_SERVICES, new String[] { "Asrv", "Bsrv" }); conf.setClass(String.format(YarnConfiguration.NM_AUX_SERVICE_FMT, "Asrv"), ServiceA.class, Service.class); conf.setClass(String.format(YarnConfiguration.NM... | public AuxServices() { super(AuxServices.class.getName()); serviceMap = Collections.synchronizedMap(new HashMap<String,AuxiliaryService>()); serviceMeta = Collections.synchronizedMap(new HashMap<String,ByteBuffer>()); } | AuxServices extends AbstractService implements ServiceStateChangeListener, EventHandler<AuxServicesEvent> { public AuxServices() { super(AuxServices.class.getName()); serviceMap = Collections.synchronizedMap(new HashMap<String,AuxiliaryService>()); serviceMeta = Collections.synchronizedMap(new HashMap<String,ByteBuffer... | AuxServices extends AbstractService implements ServiceStateChangeListener, EventHandler<AuxServicesEvent> { public AuxServices() { super(AuxServices.class.getName()); serviceMap = Collections.synchronizedMap(new HashMap<String,AuxiliaryService>()); serviceMeta = Collections.synchronizedMap(new HashMap<String,ByteBuffer... | AuxServices extends AbstractService implements ServiceStateChangeListener, EventHandler<AuxServicesEvent> { public AuxServices() { super(AuxServices.class.getName()); serviceMap = Collections.synchronizedMap(new HashMap<String,AuxiliaryService>()); serviceMeta = Collections.synchronizedMap(new HashMap<String,ByteBuffer... | AuxServices extends AbstractService implements ServiceStateChangeListener, EventHandler<AuxServicesEvent> { public AuxServices() { super(AuxServices.class.getName()); serviceMap = Collections.synchronizedMap(new HashMap<String,AuxiliaryService>()); serviceMeta = Collections.synchronizedMap(new HashMap<String,ByteBuffer... |
@Test public void testInfoXML() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("cluster") .path("info").accept("application/xml").get(ClientResponse.class); assertEquals(MediaType.APPLICATION_XML_TYPE, response.getType()); String xml = response.getEn... | @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public ClusterInfo get() { return getClusterInfo(); } | RMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public ClusterInfo get() { return getClusterInfo(); } } | RMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public ClusterInfo get() { return getClusterInfo(); } @Inject RMWebServices(final ResourceManager rm,
final ApplicationACLsManager aclsManager); } | RMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public ClusterInfo get() { return getClusterInfo(); } @Inject RMWebServices(final ResourceManager rm,
final ApplicationACLsManager aclsManager); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) Clus... | RMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public ClusterInfo get() { return getClusterInfo(); } @Inject RMWebServices(final ResourceManager rm,
final ApplicationACLsManager aclsManager); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) Clus... |
@Test public void testInvalidUri() throws JSONException, Exception { WebResource r = resource(); String responseStr = ""; try { responseStr = r.path("ws").path("v1").path("cluster").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 ClusterInfo get() { return getClusterInfo(); } | RMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public ClusterInfo get() { return getClusterInfo(); } } | RMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public ClusterInfo get() { return getClusterInfo(); } @Inject RMWebServices(final ResourceManager rm,
final ApplicationACLsManager aclsManager); } | RMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public ClusterInfo get() { return getClusterInfo(); } @Inject RMWebServices(final ResourceManager rm,
final ApplicationACLsManager aclsManager); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) Clus... | RMWebServices { @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public ClusterInfo get() { return getClusterInfo(); } @Inject RMWebServices(final ResourceManager rm,
final ApplicationACLsManager aclsManager); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) Clus... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.