[
https://issues.apache.org/jira/browse/BEAM-7872?focusedWorklogId=301279&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-301279
]
ASF GitHub Bot logged work on BEAM-7872:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Aug/19 14:53
Start Date: 26/Aug/19 14:53
Worklog Time Spent: 10m
Work Description: lgajowy commented on pull request #9213: [BEAM-7872]
Simpler Flink cluster set up in load tests
URL: https://github.com/apache/beam/pull/9213#discussion_r317642052
##########
File path: .test-infra/jenkins/Flink.groovy
##########
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import DockerPublisher
+
+class Flink {
+ private static final String flinkVersion = '1.7'
+ private static final String flinkDownloadUrl =
'https://archive.apache.org/dist/flink/flink-1.7.0/flink-1.7.0-bin-hadoop28-scala_2.11.tgz'
+ private static final String FLINK_DIR =
'"$WORKSPACE/src/.test-infra/dataproc"'
+ private static final String FLINK_SCRIPT = 'flink_cluster.sh'
+ private def job
+ private String jobName
+ private String jobServerImageTag
+
+ Flink(job, String jobName) {
+ this.job = job
+ this.jobName = jobName
+ this.jobServerImageTag = ''
+ }
+
+ /**
+ * Creates Flink cluster and specifies cleanup steps.
+ *
+ * @param sdkHarnessImages - the list of published SDK Harness images tags
+ * @param workerCount - the initial number of worker nodes
+ * @param slotsPerTaskmanager - the number of slots per Flink task manager
+ */
+ void setUp(List<String> sdkHarnessImages, Integer workerCount, Integer
slotsPerTaskmanager = 1) {
+ setupFlinkCluster(sdkHarnessImages, workerCount, slotsPerTaskmanager)
+ addTeardownFlinkStep()
+ }
Review comment:
It seems there is not one convention in Beam's codebase. I always preferred
this: https://www.oracle.com/technetwork/java/codeconventions-141855.html (I
know it's Java, but Groovy is java's "younger brother" ;) )
> These methods should be grouped by functionality rather than by scope or
accessibility. For example, a private class method can be in between two public
instance methods. The goal is to make reading and understanding the code easier.
The main idea behind such ordering is that whenever you read a method, you
start from the most generic parts and then (if needed) sink into the details,
which are right below (private methods). Other than that, most of Java/Groovy
codebases I worked with was organized this way.
Right now if I want to dig into the details (private methods) I have to
scroll through all public methods to find them.
> I think public methods should be on top to avoid scrolling down
implementation details when looking at the interface.
I think that whenever I want to see the whole interface, I can look it up by
pressing ctrl + space and see the list of methods that are available.
----------------------------------------------------------------
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: 301279)
Time Spent: 13h 40m (was: 13.5h)
> Simpler Flink cluster set up in load tests
> ------------------------------------------
>
> Key: BEAM-7872
> URL: https://issues.apache.org/jira/browse/BEAM-7872
> Project: Beam
> Issue Type: Sub-task
> Components: testing
> Reporter: Kamil Wasilewski
> Assignee: Kamil Wasilewski
> Priority: Major
> Time Spent: 13h 40m
> Remaining Estimate: 0h
>
> Creating a new load test running on Flink runner could be easier by providing
> a single `setUp` function which would encapsulate the process of creating
> Flink cluster and registering teardown steps
--
This message was sent by Atlassian Jira
(v8.3.2#803003)