> On Jan. 18, 2016, 11:05 a.m., Peeyush Bishnoi wrote: > > client/src/main/java/org/apache/falcon/client/FalconClient.java, line 118 > > <https://reviews.apache.org/r/42449/diff/1/?file=1199867#file1199867line118> > > > > Many of these parameters has already already defined in FalconCLI > > class. Instead of defining these parameters again in FalconClient, should > > not we put all the common parameters in one class and get used by both the > > classes.
Yes, I also thought about that, there are several such refactoring which need to be done. I believe they should be in client module and cli should depend on it, will handle it with next refactoring of falcon client. > On Jan. 18, 2016, 11:05 a.m., Peeyush Bishnoi wrote: > > client/src/main/java/org/apache/falcon/client/FalconClient.java, line 845 > > <https://reviews.apache.org/r/42449/diff/1/?file=1199867#file1199867line845> > > > > In the given function you don't have a check , if any passed params is > > null or not. I haven't added the check because it was not earlier also. It still worked because path params are mandatory while query parameters are not. > On Jan. 18, 2016, 11:05 a.m., Peeyush Bishnoi wrote: > > client/src/main/java/org/apache/falcon/client/FalconClient.java, line 900 > > <https://reviews.apache.org/r/42449/diff/1/?file=1199867#file1199867line900> > > > > Shall we use StringUtils.isNotBlank(). Will change, thanks for catching it. > On Jan. 18, 2016, 11:05 a.m., Peeyush Bishnoi wrote: > > client/src/main/java/org/apache/falcon/client/FalconClient.java, line 847 > > <https://reviews.apache.org/r/42449/diff/1/?file=1199867#file1199867line847> > > > > Should not be the WebResource resource initialized before for() {} loop > > and then the parameters should be assigned to resource to perform > > ResourceBuilder. I will have to extract the first parameter out and then iterate on second parameter onward, worst case it will result in 2 extra if checks on the client side, so I preferred to keep it like this for brevity. - Ajay ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/42449/#review114981 ----------------------------------------------------------- On Jan. 18, 2016, 7:24 a.m., Ajay Yadava wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/42449/ > ----------------------------------------------------------- > > (Updated Jan. 18, 2016, 7:24 a.m.) > > > Review request for Falcon. > > > Bugs: FALCON-1707 > https://issues.apache.org/jira/browse/FALCON-1707 > > > Repository: falcon-git > > > Description > ------- > > Code Refactoring for Falcon Client > > > Diffs > ----- > > client/src/main/java/org/apache/falcon/client/FalconClient.java 3f3a871 > > Diff: https://reviews.apache.org/r/42449/diff/ > > > Testing > ------- > > > Thanks, > > Ajay Yadava > >
