[
https://issues.apache.org/jira/browse/BEAM-4283?focusedWorklogId=114335&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-114335
]
ASF GitHub Bot logged work on BEAM-4283:
----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Jun/18 13:23
Start Date: 21/Jun/18 13:23
Worklog Time Spent: 10m
Work Description: iemejia closed pull request #5713: [BEAM-4283] Fix
naming of the BigQuery fields
URL: https://github.com/apache/beam/pull/5713
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/sdks/java/nexmark/src/main/java/org/apache/beam/sdk/nexmark/Main.java
b/sdks/java/nexmark/src/main/java/org/apache/beam/sdk/nexmark/Main.java
index ceed04774c1..10317ea755a 100644
--- a/sdks/java/nexmark/src/main/java/org/apache/beam/sdk/nexmark/Main.java
+++ b/sdks/java/nexmark/src/main/java/org/apache/beam/sdk/nexmark/Main.java
@@ -145,10 +145,10 @@ public NexmarkPerf decode(InputStream inStream)
new TableSchema()
.setFields(
ImmutableList.of(
- new
TableFieldSchema().setName("Runtime(sec)").setType("FLOAT"),
- new
TableFieldSchema().setName("Events(/sec)").setType("FLOAT"),
+ new
TableFieldSchema().setName("runtimeSec").setType("FLOAT"),
+ new
TableFieldSchema().setName("eventsPerSec").setType("FLOAT"),
new TableFieldSchema()
- .setName("Size of the result collection")
+ .setName("numResults")
.setType("INTEGER")));
String tableSpec =
@@ -163,9 +163,9 @@ public NexmarkPerf decode(InputStream inStream)
input -> {
NexmarkPerf nexmarkPerf = input.getValue();
TableRow row = new TableRow()
- .set("Runtime(sec)", nexmarkPerf.runtimeSec)
- .set("Events(/sec)", nexmarkPerf.eventsPerSec)
- .set("Size of the result collection", nexmarkPerf.numResults);
+ .set("runtimeSec", nexmarkPerf.runtimeSec)
+ .set("eventsPerSec", nexmarkPerf.eventsPerSec)
+ .set("numResults", nexmarkPerf.numResults);
return row;
};
BigQueryIO.Write io =
diff --git
a/sdks/java/nexmark/src/test/java/org/apache/beam/sdk/nexmark/PerfsToBigQueryTest.java
b/sdks/java/nexmark/src/test/java/org/apache/beam/sdk/nexmark/PerfsToBigQueryTest.java
index 6fc5dabb50e..0be5b3d2d8a 100644
---
a/sdks/java/nexmark/src/test/java/org/apache/beam/sdk/nexmark/PerfsToBigQueryTest.java
+++
b/sdks/java/nexmark/src/test/java/org/apache/beam/sdk/nexmark/PerfsToBigQueryTest.java
@@ -104,16 +104,16 @@ public void testSavePerfsToBigQuery() throws IOException,
InterruptedException {
assertEquals("Wrong number of rows inserted", 2, actualRows.size());
List<TableRow> expectedRows = new ArrayList<>();
TableRow row1 = new TableRow()
- .set("Runtime(sec)", nexmarkPerf1.runtimeSec).set("Events(/sec)",
nexmarkPerf1.eventsPerSec)
+ .set("runtimeSec", nexmarkPerf1.runtimeSec).set("eventsPerSec",
nexmarkPerf1.eventsPerSec)
// when read using TableRowJsonCoder the row field is boxed into an
Integer, cast it to int
// to for bowing into Integer in the expectedRows.
- .set("Size of the result collection", (int) nexmarkPerf1.numResults);
+ .set("numResults", (int) nexmarkPerf1.numResults);
expectedRows.add(row1);
TableRow row2 = new TableRow()
- .set("Runtime(sec)", nexmarkPerf2.runtimeSec).set("Events(/sec)",
nexmarkPerf2.eventsPerSec)
+ .set("runtimeSec", nexmarkPerf2.runtimeSec).set("eventsPerSec",
nexmarkPerf2.eventsPerSec)
// when read using TableRowJsonCoder the row field is boxed into an
Integer, cast it to int
// to for bowing into Integer in the expectedRows.
- .set("Size of the result collection", (int) nexmarkPerf2.numResults);
+ .set("numResults", (int) nexmarkPerf2.numResults);
expectedRows.add(row2);
assertThat(actualRows, containsInAnyOrder(Iterables.toArray(expectedRows,
TableRow.class)));
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 114335)
Time Spent: 8.5h (was: 8h 20m)
> Export nexmark execution times to bigQuery
> ------------------------------------------
>
> Key: BEAM-4283
> URL: https://issues.apache.org/jira/browse/BEAM-4283
> Project: Beam
> Issue Type: Sub-task
> Components: examples-nexmark
> Reporter: Etienne Chauchot
> Assignee: Etienne Chauchot
> Priority: Major
> Fix For: 2.6.0
>
> Time Spent: 8.5h
> Remaining Estimate: 0h
>
> Nexmark only outputs the results collection to bigQuery and prints in the
> console the execution times. To supervise Nexmark execution times, we need to
> store them as well per runner/query/mode
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)