-
Notifications
You must be signed in to change notification settings - Fork 440
TEZ-4014: Allow DAGAppMaster to read configuration from plaintext (1/3) #408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
okumin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This comment was marked as outdated.
This comment was marked as outdated.
| assertEquals(conf.get("tez.lib.uris"), "tez.tar.gz"); | ||
| } | ||
|
|
||
| @Test(timeout = 5000) | ||
| public void testPluginsDescriptorFromJSON() throws IOException { | ||
| InputStream is = ClassLoader.getSystemResourceAsStream(TezConstants.SERVICE_PLUGINS_DESCRIPTOR_JSON); | ||
| ServicePluginsDescriptor spd = TezClientUtils.createPluginsDescriptorFromJSON(is); | ||
| TaskSchedulerDescriptor tsd = spd.getTaskSchedulerDescriptors()[0]; | ||
| ContainerLauncherDescriptor cld = spd.getContainerLauncherDescriptors()[0]; | ||
| TaskCommunicatorDescriptor tcd = spd.getTaskCommunicatorDescriptors()[0]; | ||
|
|
||
| assertFalse(spd.areContainersEnabled()); | ||
| assertTrue(spd.isUberEnabled()); | ||
| assertEquals(tsd.getClassName(), "testScheduler0_class"); | ||
| assertEquals(tsd.getEntityName(), "testScheduler0"); | ||
| assertEquals(cld.getClassName(), "testLauncher0_class"); | ||
| assertEquals(cld.getEntityName(), "testLauncher0"); | ||
| assertEquals(tcd.getClassName(), "testComm0_class"); | ||
| assertEquals(tcd.getEntityName(), "testComm0"); | ||
| assertEquals(tcd.getUserPayload().getVersion(), 1); | ||
| assertArrayEquals(tcd.getUserPayload().deepCopyAsArray(), new byte[] {0, 0, 0, 1}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you check the order of arguments in assertEquals, the expected in first argument actual is second, I think it is opposite here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, let me fix
| } | ||
| } | ||
|
|
||
| public static Configuration readTezConfigurationXml(InputStream is) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't throw IOE
| return configuration; | ||
| } | ||
|
|
||
| public static ConfigurationProto loadConfProtoFromText() throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which method call this? this shows as unused. Removing it doesn't make any test fail either
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8d0dced to
011598b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
011598b to
1c21f1f
Compare
|
🎊 +1 overall
This message was automatically generated. |
ayushtkn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.