> On szept. 6, 2017, 4:29 du, András Piros wrote: > > core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java > > Lines 558-570 (patched) > > <https://reviews.apache.org/r/61560/diff/3/?file=1816365#file1816365line560> > > > > I'd extract those three methods, and this one, to a new service called > > `HadoopTokenService`. It's best readable and tested then. > > Peter Cseh wrote: > Will look into this. I don't think I will turn it into an actual Oozie > Service. I don't really thing there is much I can test here at the Unit level.
It's not necessarily a bad idea, although the code path we have here is fairly obvious. Still, it's good to have something that gives us some coverage. I think we can create a class like DelegationTokenRetriever, which receives YarnClient, JHS proxy (or YarnRPC) and FS in the constructor. Then it's easy to unit test it. - Peter ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61560/#review184696 ----------------------------------------------------------- On szept. 6, 2017, 2:25 du, Peter Cseh wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61560/ > ----------------------------------------------------------- > > (Updated szept. 6, 2017, 2:25 du) > > > Review request for oozie, Attila Sasvari, Peter Bacsko, Robert Kanter, and > Rohini Palaniswamy. > > > Bugs: OOZIE-2909 > https://issues.apache.org/jira/browse/OOZIE-2909 > > > Repository: oozie-git > > > Description > ------- > > Changing UGI calls and cleaning up things around requesting tokens. > > > Diffs > ----- > > core/src/main/java/org/apache/oozie/ErrorCode.java > 662e1edc9c4b23b3606c751bf5ed4b531ee7ac62 > > core/src/main/java/org/apache/oozie/action/hadoop/CredentialsProviderFactory.java > 5ca8d3e80942840a5bba51a06694350929044042 > core/src/main/java/org/apache/oozie/action/hadoop/HCatCredentialHelper.java > 9804c7b673a899cd9c778850c9a64731cc642fb3 > core/src/main/java/org/apache/oozie/action/hadoop/HbaseCredentials.java > 4add5f14cb20ab77c755b81eff939335c0c5fddc > core/src/main/java/org/apache/oozie/action/hadoop/Hive2Credentials.java > 0b495f75842b0033a3337ef6728a334bf5651770 > core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java > bca79aa052521ea4f6f16e76bd69f84fb16be790 > core/src/main/java/org/apache/oozie/service/HadoopAccessorService.java > 187cee2290ba4bbe358913d28a052d9c75f2369a > core/src/test/java/org/apache/oozie/service/TestHadoopAccessorService.java > 960c2f9750062c98fdf7a2b456d3668069e07ca5 > > sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/AMRMClientAsyncFactory.java > b4cbb4b1d9b52aaebfb562c02edc91e15a2a9a2e > > sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/HdfsOperations.java > 874d371664ced3ae19a7b5d615c67d4c72e7cfdd > sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/LauncherAM.java > 6a98d6ef3a09a7a75272f3f0f9a9c2fc5472e76d > sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java > bde7f1daf123d663d47f5d2fb2350cfa1ac33ed8 > > sharelib/oozie/src/test/java/org/apache/oozie/action/hadoop/TestHdfsOperations.java > 68c0f4bafe0322ff0d1007297cd6e8f38c92020a > > sharelib/oozie/src/test/java/org/apache/oozie/action/hadoop/TestLauncherAM.java > 37af3dd9ed43f4504ff3909484237e2d05665c6c > > > Diff: https://reviews.apache.org/r/61560/diff/3/ > > > Testing > ------- > > We're running tests on a Kerberized cluster with these changes. > > > Thanks, > > Peter Cseh > >
