That's interesting, the command works for me (it crashes on communication with GCP, but that was expected). From the log output it seems you're using Windows. Did you use WSL to run this? Do you have an option to use Linux to check this command? The JSON created in the Gradle script may be treated differently in CMD (due to quoting differences between it and Bash/ZSH/ other shells).
I'd try to run this somewhere else other than CMD. Good luck! @Brian: -DbeamPipelineOptions parameter is constructed by Gradle from an object via JsonOutput, so it should be a valid object after reading back. On Thu, Nov 28, 2019 at 7:39 AM Rehman Murad Ali < [email protected]> wrote: > Thank you, Brian and Michal, for replying. Here is the full command: > > ./gradlew > :runners:google-cloud-dataflow-java:examples:preCommitLegacyWorker > -PdataflowProject=apache-beam-testing -Pproject=apache-beam-testing > -PgcpProject=apache-beam-testing > -PgcsTempRoot=gs://venturedive-beamers-shoaib-mszb/rehman-java > -PdataflowTempRoot=gs://venturedive-beamers-shoaib-mszb/rehman-java > > > Source: Confluence Java Tips > <https://cwiki.apache.org/confluence/display/BEAM/Java+Tips> > > > > *Thanks & Regards* > > > *Rehman Murad Ali* > > Software Engineer > Mobile: +92 3452076766 > Skype: rehman,muradali > > <http://venturedive.com/> > > > On Thu, Nov 28, 2019 at 10:42 AM Zohaib Baig <[email protected]> > wrote: > >> +Rehman Murad Ali <[email protected]> >> >> On Thu, Nov 28, 2019 at 2:58 AM Brian Hulette <[email protected]> >> wrote: >> >>> It looks like you passed an argument like >>> -DbeamTestPipelineOptions >>> "[--project=apache-beam-testing,--tempRoot=gs://venturedive-beamers-shoaib-mszb/rehman-java,--runner=TestDataflowRunner,--dataflowWorkerJar=D:\\Workspace\\apache\\beam\\runners\\google-cloud-dataflow-java\\worker\\legacy-worker\\build\\libs\\beam-runners-google-cloud-dataflow-java-legacy-worker-2.18.0-SNAPSHOT.jar,]", >>> but the string inside the quotes needs to be a valid JSON array of strings. >>> If you change it to something like -DbeamTestPipelineOptions >>> '["--project=apache-beam-testing",...]' you should get past that error. >>> >>> Agree with Michał though that we could help best if you share your full >>> command line. >>> >>> Brian >>> >>> On Wed, Nov 27, 2019 at 8:20 AM Michał Walenia < >>> [email protected]> wrote: >>> >>>> Hi, >>>> can you please post the command you used in the terminal? It seems you >>>> used a wrong combination of quotes, but I'd need to see it to be sure. >>>> Cheers, >>>> Michal >>>> >>>> On Wed, Nov 27, 2019 at 5:11 PM Rehman Murad Ali < >>>> [email protected]> wrote: >>>> >>>>> Hi Community, >>>>> >>>>> I have been recently trying to test data flow jobs with the beam. I >>>>> have set up Gcloud account and tried to copy a file from the local system >>>>> to the Gcloud storage (which works fine). >>>>> >>>>> Now I am trying to run preCommitLegacyWorker task on local and I am >>>>> getting the following error: >>>>> >>>>> Unable to instantiate test options from system property >>>>> beamTestPipelineOptions >>>>> >>>>> >>>>> Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected >>>>> character ('-' (code 45)) in numeric value: expected digit (0-9) to follow >>>>> minus sign, for valid numeric value >>>>> at [Source: >>>>> (String)"[--project=apache-beam-testing,--tempRoot=gs://venturedive-beamers-shoaib-mszb/rehman-java,--runner=TestDataflowRunner,--dataflowWorkerJar=D:\\Workspace\\apache\\beam\\runners\\google-cloud-dataflow-java\\worker\\legacy-worker\\build\\libs\\beam-runners-google-cloud-dataflow-java-legacy-worker-2.18.0-SNAPSHOT.jar,]"; >>>>> line: 1, column: 4] >>>>> at >>>>> com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1804) >>>>> at >>>>> com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:693) >>>>> at >>>>> com.fasterxml.jackson.core.base.ParserMinimalBase.reportUnexpectedNumberChar(ParserMinimalBase.java:541) >>>>> at >>>>> com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleInvalidNumberStart(ReaderBasedJsonParser.java:1637) >>>>> at >>>>> com.fasterxml.jackson.core.json.ReaderBasedJsonParser._parseNegNumber(ReaderBasedJsonParser.java:1391) >>>>> at >>>>> com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:742) >>>>> at >>>>> com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextTextValue(ReaderBasedJsonParser.java:1160) >>>>> at >>>>> com.fasterxml.jackson.databind.deser.std.StringArrayDeserializer.deserialize(StringArrayDeserializer.java:145) >>>>> >>>>> >>>>> >>>>> Any help would be appreciable. >>>>> >>>>> >>>>> >>>>> *Thanks & Regards* >>>>> >>>>> >>>>> *Rehman Murad Ali* >>>>> >>>>> Software Engineer >>>>> Mobile: +92 3452076766 <+92%20345%202076766> >>>>> Skype: rehman,muradali >>>>> >>>>> <http://venturedive.com/> >>>>> >>>> >>>> >>>> -- >>>> >>>> Michał Walenia >>>> Polidea <https://www.polidea.com/> | Software Engineer >>>> >>>> M: +48 791 432 002 <+48791432002> >>>> E: [email protected] >>>> >>>> Unique Tech >>>> Check out our projects! <https://www.polidea.com/our-work> >>>> >>> >> >> -- >> >> *Muhammad Zohaib Baig* >> Senior Software Engineer >> Mobile: +92 3443060266 >> Skype: mzobii.baig >> >> <http://venturedive.com/> >> > -- Michał Walenia Polidea <https://www.polidea.com/> | Software Engineer M: +48 791 432 002 <+48791432002> E: [email protected] Unique Tech Check out our projects! <https://www.polidea.com/our-work>
