Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.7.0
-
None
-
Reviewed
Description
After YARN-2921, MockRM has also a LOG field. Therefore LOG in the following code snippet is ambiguous.
protected AdminService createAdminService() { return new AdminService(MockRMWithElector.this, getRMContext()) { @Override protected EmbeddedElectorService createEmbeddedElectorService() { return new EmbeddedElectorService(getRMContext()) { @Override public void becomeActive() throws ServiceFailedException { try { callbackCalled.set(true); LOG.info("Callback called. Sleeping now"); Thread.sleep(delayMs); LOG.info("Sleep done"); } catch (InterruptedException e) { e.printStackTrace(); } super.becomeActive(); } }; } }; }
Eclipse gives the following error:
The field LOG is defined in an inherited type and an enclosing scope
IMO, we should fix this as TestRMEmbeddedElector.LOG