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

ASF GitHub Bot commented on BEAM-3060:
--------------------------------------

chamikaramj closed pull request #4401: [BEAM-3060] Support for Perfkit 
execution of file-based-io-tests on HDFS cluster.
URL: https://github.com/apache/beam/pull/4401
 
 
   

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/.test-infra/kubernetes/hadoop/SmallITCluster/pkb-config.yml 
b/.test-infra/kubernetes/hadoop/SmallITCluster/pkb-config.yml
new file mode 100644
index 00000000000..72f458a9bc8
--- /dev/null
+++ b/.test-infra/kubernetes/hadoop/SmallITCluster/pkb-config.yml
@@ -0,0 +1,40 @@
+#
+# 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.
+#
+
+# This file is a pkb benchmark configuration file, used when running the IO ITs
+# that use this data store. It allows users to run tests when they are on a
+# separate network from the kubernetes cluster by reading the hadoop namenode 
IP
+# address from the LoadBalancer service.
+#
+# When running Perfkit with DirectRunner - format pattern must additionally 
contain
+# dfs.client.use.datanode.hostname set to true:
+#   format: 
'[{\"fs.defaultFS\":\"hdfs://{{LoadBalancerIp}}:9000\",\"dfs.replication\":1,\"dfs.client.use.datanode.hostname\":\"true\"
 }]'
+# and /etc/hosts should be modified with an entry containing:
+#   LoadBalancerIp HadoopMasterPodName
+# otherwise hdfs client won't be able to reach datanode.
+# FilenamePrefix is used in file-based-io-tests.
+
+static_pipeline_options:
+dynamic_pipeline_options:
+  - name: hdfsConfiguration
+    format: 
'[{\"fs.defaultFS\":\"hdfs://{{LoadBalancerIp}}:9000\",\"dfs.replication\":1}]'
+    type: LoadBalancerIp
+    serviceName: hadoop-external
+  - name: filenamePrefix
+    format: 'hdfs://{{LoadBalancerIp}}:9000/TEXTIO_IT_'
+    type: LoadBalancerIp
+    serviceName: hadoop-external
diff --git a/sdks/java/io/file-based-io-tests/pom.xml 
b/sdks/java/io/file-based-io-tests/pom.xml
index bd041040bc4..23c1b31c563 100644
--- a/sdks/java/io/file-based-io-tests/pom.xml
+++ b/sdks/java/io/file-based-io-tests/pom.xml
@@ -133,6 +133,110 @@
                             </arguments>
                         </configuration>
                     </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <version>${surefire-plugin.version}</version>
+                        <configuration>
+                            <skipTests>true</skipTests>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <!--
+            This profile invokes PerfKitBenchmarker, which does benchmarking of
+            the IO ITs with HDFS filesystem. The arguments passed to it allow 
it
+            to invoke mvn again with the desired benchmark.
+
+            To invoke this, run:
+
+            mvn verify -Dio-it-hdfs-small -pl sdks/java/io/file-based-io-tests
+                -DpkbLocation="path-to-pkb.py" \
+                
-DintegrationTestPipelineOptions='["&ndash;&ndash;numberOfRecords=100000", \
+                "&ndash;&ndash;tempRoot=gs://bucket-name/"]' \
+                -DpkbExtraProperties='["filesystem=hdfs"]' \
+                -DfileBasedIoItClass=file-based IO IT class, eg. 
org.apache.beam.sdk.io.text.TextIOIT
+
+            For DirectRunner, please use -DforceDirectRunner=true argument and 
check
+            .test-infra/kubernetes/hadoop/SmallITCluster/pkb-config.yml for 
info about necessary modifications.
+            Line containing argument beam_kubernetes_scripts must be commented 
out, because test infrastructure
+            when testing on DirectRunner must be created manually using 
provided scripts.
+
+            For other runners please check doc in BEAM-3060 and 
https://beam.apache.org/documentation/io/testing/
+        -->
+        <profile>
+            <id>io-it-hdfs-small</id>
+            <activation>
+                <property><name>io-it-suite-hdfs-small</name></property>
+            </activation>
+            <properties>
+                <!-- This is based on the location of the current pom relative 
to the root
+                     See discussion in BEAM-2460 -->
+                
<beamRootProjectDir>${project.parent.parent.parent.parent.basedir}</beamRootProjectDir>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.gmaven</groupId>
+                        <artifactId>groovy-maven-plugin</artifactId>
+                        <version>${groovy-maven-plugin.version}</version>
+                        <executions>
+                            <execution>
+                                <id>find-supported-python-for-compile</id>
+                                <phase>initialize</phase>
+                                <goals>
+                                    <goal>execute</goal>
+                                </goals>
+                                <configuration>
+                                    
<source>${beamRootProjectDir}/sdks/python/findSupportedPython.groovy</source>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <version>${maven-exec-plugin.version}</version>
+                        <executions>
+                            <execution>
+                                <phase>verify</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <executable>${python.interpreter.bin}</executable>
+                            <arguments>
+                                <argument>${pkbLocation}</argument>
+                                
<argument>-benchmarks=beam_integration_benchmark</argument>
+                                <argument>-beam_it_profile=io-it</argument>
+                                
<argument>-beam_location=${beamRootProjectDir}</argument>
+                                <argument>-beam_prebuilt=true</argument>
+                                <argument>-beam_sdk=java</argument>
+                                <argument>-kubeconfig=${kubeconfig}</argument>
+                                <argument>-kubectl=${kubectl}</argument>
+                                <!-- runner overrides, controlled via 
forceDirectRunner -->
+                                <argument>${pkbBeamRunnerProfile}</argument>
+                                <argument>${pkbBeamRunnerOption}</argument>
+                                <!-- specific to this IO -->
+                                
<argument>-beam_it_module=sdks/java/io/file-based-io-tests</argument>
+                                
<argument>-beam_it_class=${fileBasedIoItClass}</argument>
+                                <!-- arguments typically defined by user -->
+                                
<argument>-beam_it_options=${integrationTestPipelineOptions}</argument>
+                                
<argument>-beam_options_config_file=${beamRootProjectDir}/.test-infra/kubernetes/hadoop/SmallITCluster/pkb-config.yml</argument>
+                                
<argument>-beam_kubernetes_scripts=${beamRootProjectDir}/.test-infra/kubernetes/hadoop/SmallITCluster/hdfs-single-datanode-cluster.yml,${beamRootProjectDir}/.test-infra/kubernetes/hadoop/SmallITCluster/hdfs-single-datanode-cluster-for-local-dev.yml</argument>
+                                <!--
+                                optional array of key=value items. It will be 
passed to
+                                target mvn command by pkb. eg. 
-DpkbExtraProperties='["filesystem=local"]'
+                                -->
+                                
<argument>-beam_extra_mvn_properties=${pkbExtraProperties}</argument>
+                            </arguments>
+                        </configuration>
+                    </plugin>
 
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>


 

----------------------------------------------------------------
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]


> Add performance tests for commonly used file-based I/O PTransforms
> ------------------------------------------------------------------
>
>                 Key: BEAM-3060
>                 URL: https://issues.apache.org/jira/browse/BEAM-3060
>             Project: Beam
>          Issue Type: Test
>          Components: sdk-java-core
>            Reporter: Chamikara Jayalath
>            Assignee: Szymon Nieradka
>            Priority: Major
>
> We recently added a performance testing framework [1] that can be used to do 
> following.
> (1) Execute Beam tests using PerfkitBenchmarker
> (2) Manage Kubernetes-based deployments of data stores.
> (3) Easily publish benchmark results. 
> I think it will be useful to add performance tests for commonly used 
> file-based I/O PTransforms using this framework. I suggest looking into 
> following formats initially.
> (1) AvroIO
> (2) TextIO
> (3) Compressed text using TextIO
> (4) TFRecordIO
> It should be possibly to run these tests for various Beam runners (Direct, 
> Dataflow, Flink, Spark, etc.) and file-systems (GCS, local, HDFS, etc.) 
> easily.
> In the initial version, tests can be made manually triggerable for PRs 
> through Jenkins. Later, we could make some of these tests run periodically 
> and publish benchmark results (to BigQuery) through PerfkitBenchmarker.
> [1] https://beam.apache.org/documentation/io/testing/



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to