[
https://issues.apache.org/jira/browse/BEAM-2855?focusedWorklogId=467642&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-467642
]
ASF GitHub Bot logged work on BEAM-2855:
----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Aug/20 00:11
Start Date: 07/Aug/20 00:11
Worklog Time Spent: 10m
Work Description: pabloem commented on a change in pull request #12427:
URL: https://github.com/apache/beam/pull/12427#discussion_r466750803
##########
File path: sdks/python/apache_beam/testing/benchmarks/nexmark/nexmark_util.py
##########
@@ -103,6 +121,107 @@ def process(self, elem):
yield event
+class ParseJsonEvnetFn(beam.DoFn):
+ """Parses the raw event info into a Python objects.
+
+ Each event line has the following format:
+
+ person: {id,name,email,credit_card,city, \
+ state,timestamp,extra}
+ auction: {id,item_name, description,initial_bid, \
+
reserve_price,timestamp,expires,seller,category,extra}
+ bid: {auction,bidder,price,timestamp,extra}
+
+ For example:
+
+ {"id":1000,"name":"Peter Jones","emailAddress":"[email protected]",\
+ "creditCard":"7241 7320 9143 4888","city":"Portland","state":"WY",\
+ "dateTime":1528098831026,\"extra":"WN_HS_bnpVQ\\[["}
+
+ {"id":1000,"itemName":"wkx mgee","description":"eszpqxtdxrvwmmywkmogoahf",\
+ "initialBid":28873,"reserve":29448,"dateTime":1528098831036,\
+ "expires":1528098840451,"seller":1000,"category":13,"extra":"zcuupiz"}
+
+ {"auction":1000,"bidder":1001,"price":32530001,"dateTime":1528098831066,\
+ "extra":"fdiysaV^]NLVsbolvyqwgticfdrwdyiyofWPYTOuwogvszlxjrcNOORM"}
Review comment:
It's a bit of a silly thing, but something like this:
```suggestion
person: {id,name,email,credit_card,city, \
state,timestamp,extra}
auction: {id,item_name, description,initial_bid, \
reserve_price,timestamp,expires,seller,category,extra}
bid: {auction,bidder,price,timestamp,extra}
For example:
{"id":1000,"name":"Peter Jones","emailAddress":"[email protected]",\
"creditCard":"7241 7320 9143 4888","city":"Portland","state":"WY",\
"dateTime":1528098831026,\"extra":"WN_HS_bnpVQ\\[["}
{"id":1000,"itemName":"wkx
mgee","description":"eszpqxtdxrvwmmywkmogoahf",\
"initialBid":28873,"reserve":29448,"dateTime":1528098831036,\
"expires":1528098840451,"seller":1000,"category":13,"extra":"zcuupiz"}
{"auction":1000,"bidder":1001,"price":32530001,"dateTime":1528098831066,\
"extra":"fdiysaV^]NLVsbolvyqwgticfdrwdyiyofWPYTOuwogvszlxjrcNOORM"}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 467642)
Time Spent: 15h 20m (was: 15h 10m)
> Implement a Python version of the Nexmark queries
> -------------------------------------------------
>
> Key: BEAM-2855
> URL: https://issues.apache.org/jira/browse/BEAM-2855
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-py-core, testing, testing-nexmark
> Reporter: Ismaël Mejía
> Priority: P3
> Labels: newbie, nexmark, starter
> Time Spent: 15h 20m
> Remaining Estimate: 0h
>
> Currently we have a Java only implementation of Nexmark, a python based
> implementation would be nice to have to validate the direct and dataflow
> runners, but also to validate the new support of multiple SDKs in multiple
> runners via the runner/fn API.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)