[ 
https://issues.apache.org/jira/browse/APEXCORE-644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15860367#comment-15860367
 ] 

Sergey Golovko commented on APEXCORE-644:
-----------------------------------------

There are two apex command line operators that have the option "-parent" 
(get-app-package-operators and get-jar-operator-classes). And both of them have 
the mandatory argument <full name of the parent class>.

The implementation of the class GetOperatorClassesCommandLineOptions that 
builds command line parser options created the descriptor of the option 
"-parent" without an argument. And as the result, the argument of the option 
was ignored and it was moved to the list of the regular command line parameters.

The bug fix is trivial. It defines the option "-parent" as an option with an 
argument.

Added the new unit test ApexCliTest.testGetOperatorClassesCommandLineInfo().


> get-app-package-operators with parent option does not work
> ----------------------------------------------------------
>
>                 Key: APEXCORE-644
>                 URL: https://issues.apache.org/jira/browse/APEXCORE-644
>             Project: Apache Apex Core
>          Issue Type: Bug
>            Reporter: Yatin Chaubal
>            Assignee: Sergey Golovko
>            Priority: Minor
>
> Issue: get-app-package-operators with -parent option doesnot work
>  
> Steps:
> 1) Start dtcli/apex
> 2) Run get-app-package-operators -parent com.datatorrent.demos.pi 
> /home/hduser/tf2jan/apa/pi-demo-3.4.0.apa
> Expected out output: valid JSON 
> Actual output: 
> {noformat}
> com.datatorrent.stram.cli.ApexCli$CliException: 
> /home/hduser/tf2jan/com.datatorrent.demos.pi does not match any file
>     at com.datatorrent.stram.cli.ApexCli.expandFileName(ApexCli.java:918)
>     at com.datatorrent.stram.cli.ApexCli.access$000(ApexCli.java:152)
>     at 
> com.datatorrent.stram.cli.ApexCli$GetAppPackageOperatorsCommand.execute(ApexCli.java:3827)
>     at com.datatorrent.stram.cli.ApexCli$3.run(ApexCli.java:1492)
> {noformat}
> Reference:
> Without -parent option this work fine
> apex> get-app-package-operators  /home/hduser/tf2jan/apa/pi-demo-3.4.0.apa
> {
>   "operatorClasses": [
>     {
>       "name": "com.datatorrent.common.util.DefaultDelayOperator",
>       "properties": [],
>       "portTypeInfo": [
>         {



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to