[ 
https://issues.apache.org/jira/browse/HADOOP-17191?focusedWorklogId=480421&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-480421
 ]

ASF GitHub Bot logged work on HADOOP-17191:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 08/Sep/20 20:09
            Start Date: 08/Sep/20 20:09
    Worklog Time Spent: 10m 
      Work Description: steveloughran commented on a change in pull request 
#2278:
URL: https://github.com/apache/hadoop/pull/2278#discussion_r485164407



##########
File path: hadoop-tools/hadoop-azure/.gitignore
##########
@@ -1,2 +1,4 @@
 .checkstyle
-bin/
\ No newline at end of file
+bin/
+testlogs

Review comment:
       test results should go into target so a "mvn clean" will delete them

##########
File path: hadoop-tools/hadoop-azure/testsupport.sh
##########
@@ -0,0 +1,109 @@
+#!/usr/bin/env bash
+
+# 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.
+
+conffile=src/test/resources/abfs-testrun-configs.xml
+bkpconffile=src/test/resources/abfs-testrun-configs_BKP.xml
+testresultsregex="Results:(\n|.)*?Tests run:"
+testresultsfilename=
+starttime=
+
+validate() {
+  if [ -z "$scenario" ]; then
+   echo "Exiting. scenario cannot be empty"
+   exit
+  fi
+  propertiessize=${#properties[@]}
+  valuessize=${#values[@]}
+  if [ "$propertiessize" -lt 1 ] || [ "$valuessize" -lt 1 ] || [ 
"$propertiessize" -ne "$valuessize" ]; then
+    echo "Exiting. Both properties and values arrays has to be populated and 
of same size. Please check for scenario $scenario"
+    exit
+  fi
+}
+
+checkdependancies() {
+  if ! [ "$(command -v pcregrep)" ]; then
+    echo "Exiting. pcregrep is required to run the script."
+    exit
+  fi
+  if ! [ "$(command -v xmlstarlet)" ]; then
+    echo "Exiting. xmlstarlet is required to run the script."
+    exit
+  fi
+}
+
+changeconf() {
+  xmlstarlet ed -P -L -d "/configuration/property[name='$1']" $conffile
+  xmlstarlet ed -P -L -s /configuration -t elem -n propertyTMP -v "" -s 
/configuration/propertyTMP -t elem -n name -v "$1" -r 
/configuration/propertyTMP -v property $conffile
+  xmlstarlet ed -P -L -s "/configuration/property[name='$1']" -t elem -n value 
-v "$2" $conffile
+}
+
+testwithconfs() {
+  propertiessize=${#properties[@]}
+  valuessize=${#values[@]}
+  if [ "$propertiessize" -ne "$valuessize" ]; then
+    echo "Exiting. Number of properties and values differ for $scenario"
+    exit
+  fi
+  for ((i = 0; i < propertiessize; i++)); do
+    key=${properties[$i]}
+    val=${values[$i]}
+    changeconf "$key" "$val"
+  done
+  mvn -T 1C -Dparallel-tests=abfs -Dscale -DtestsThreadCount=8 clean verify >> 
"$testlogfilename"

Review comment:
       should thread count be configurable? 

##########
File path: hadoop-tools/hadoop-azure/testsupport.sh
##########
@@ -0,0 +1,109 @@
+#!/usr/bin/env bash
+
+# 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.
+
+conffile=src/test/resources/abfs-testrun-configs.xml
+bkpconffile=src/test/resources/abfs-testrun-configs_BKP.xml
+testresultsregex="Results:(\n|.)*?Tests run:"
+testresultsfilename=
+starttime=
+
+validate() {
+  if [ -z "$scenario" ]; then
+   echo "Exiting. scenario cannot be empty"
+   exit
+  fi
+  propertiessize=${#properties[@]}
+  valuessize=${#values[@]}
+  if [ "$propertiessize" -lt 1 ] || [ "$valuessize" -lt 1 ] || [ 
"$propertiessize" -ne "$valuessize" ]; then
+    echo "Exiting. Both properties and values arrays has to be populated and 
of same size. Please check for scenario $scenario"
+    exit
+  fi
+}
+
+checkdependancies() {

Review comment:
       nit: typo in dependencies

##########
File path: 
hadoop-tools/hadoop-azure/src/test/resources/abfs-testrun-configs.xml.template
##########
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed 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.
+-->
+
+<configuration>
+
+  <!--====================== IMPORTANT!! ========================-->
+  <!--
+      1. PLEASE PROVIDE VALUES FOR THE CONFIGS IN THIS FILE AND
+         RENAME THE SAME TO "abfs-testrun-configs.xml"
+      2. UPDATE runtests.sh
+         A.  "fs.azure.abfs.account.name" AND "fs.azure.test.namespace.enabled"
+             ARE MANDATORY WITH EVERY SCENARIO. AUTHTYPE BY DEFAULT WILL BE
+             SHAREDKEY AS CONFIGURED IN THIS TEMPLATE FILE.
+         B.  PLEASE ADD MORE SCENARIOS IF THE CODE CHANGE REQUIRES TESTING WITH
+             DIFFERENT VARIANTS OF CONFIGS.
+      3. THE SCRIPT REQUIRES THE FOLLOWING UTILITIES xmlstarlet AND pcregrep

Review comment:
       ??

##########
File path: hadoop-tools/hadoop-azure/testsupport.sh
##########
@@ -0,0 +1,109 @@
+#!/usr/bin/env bash
+
+# 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.
+
+conffile=src/test/resources/abfs-testrun-configs.xml
+bkpconffile=src/test/resources/abfs-testrun-configs_BKP.xml
+testresultsregex="Results:(\n|.)*?Tests run:"
+testresultsfilename=
+starttime=
+
+validate() {
+  if [ -z "$scenario" ]; then
+   echo "Exiting. scenario cannot be empty"
+   exit
+  fi
+  propertiessize=${#properties[@]}
+  valuessize=${#values[@]}
+  if [ "$propertiessize" -lt 1 ] || [ "$valuessize" -lt 1 ] || [ 
"$propertiessize" -ne "$valuessize" ]; then
+    echo "Exiting. Both properties and values arrays has to be populated and 
of same size. Please check for scenario $scenario"
+    exit
+  fi
+}
+
+checkdependancies() {
+  if ! [ "$(command -v pcregrep)" ]; then
+    echo "Exiting. pcregrep is required to run the script."
+    exit
+  fi
+  if ! [ "$(command -v xmlstarlet)" ]; then
+    echo "Exiting. xmlstarlet is required to run the script."
+    exit
+  fi
+}
+
+changeconf() {
+  xmlstarlet ed -P -L -d "/configuration/property[name='$1']" $conffile
+  xmlstarlet ed -P -L -s /configuration -t elem -n propertyTMP -v "" -s 
/configuration/propertyTMP -t elem -n name -v "$1" -r 
/configuration/propertyTMP -v property $conffile
+  xmlstarlet ed -P -L -s "/configuration/property[name='$1']" -t elem -n value 
-v "$2" $conffile

Review comment:
       do you need to check exit codes here?

##########
File path: 
hadoop-tools/hadoop-azure/src/test/resources/abfs-testrun-configs.xml.template
##########
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed 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.
+-->
+
+<configuration>
+
+  <!--====================== IMPORTANT!! ========================-->
+  <!--
+      1. PLEASE PROVIDE VALUES FOR THE CONFIGS IN THIS FILE AND
+         RENAME THE SAME TO "abfs-testrun-configs.xml"
+      2. UPDATE runtests.sh
+         A.  "fs.azure.abfs.account.name" AND "fs.azure.test.namespace.enabled"
+             ARE MANDATORY WITH EVERY SCENARIO. AUTHTYPE BY DEFAULT WILL BE
+             SHAREDKEY AS CONFIGURED IN THIS TEMPLATE FILE.
+         B.  PLEASE ADD MORE SCENARIOS IF THE CODE CHANGE REQUIRES TESTING WITH
+             DIFFERENT VARIANTS OF CONFIGS.
+      3. THE SCRIPT REQUIRES THE FOLLOWING UTILITIES xmlstarlet AND pcregrep
+      4. NOW THE SCRIPT CAN BE EXECUTED WITH ./runtests.sh
+  -->
+
+  <!--=============== Auth type ===============-->
+  <property>
+    <name>fs.azure.account.auth.type</name>
+    <value>SharedKey</value>
+  </property>
+
+  <!--=============== Auth related accounts ===============-->
+  <!-- This set of configs needs to be provided for all the accounts with which

Review comment:
       This needs to support XInclude. I refer to all my cloud store secrets 
outside the source tree, as I don't ever want them in an SCM-managed repo. 
auth-keys lets me do this

##########
File path: hadoop-tools/hadoop-azure/testsupport.sh
##########
@@ -0,0 +1,109 @@
+#!/usr/bin/env bash
+
+# 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.
+
+conffile=src/test/resources/abfs-testrun-configs.xml
+bkpconffile=src/test/resources/abfs-testrun-configs_BKP.xml
+testresultsregex="Results:(\n|.)*?Tests run:"
+testresultsfilename=
+starttime=
+
+validate() {
+  if [ -z "$scenario" ]; then
+   echo "Exiting. scenario cannot be empty"
+   exit
+  fi
+  propertiessize=${#properties[@]}
+  valuessize=${#values[@]}
+  if [ "$propertiessize" -lt 1 ] || [ "$valuessize" -lt 1 ] || [ 
"$propertiessize" -ne "$valuessize" ]; then
+    echo "Exiting. Both properties and values arrays has to be populated and 
of same size. Please check for scenario $scenario"
+    exit
+  fi
+}
+
+checkdependancies() {
+  if ! [ "$(command -v pcregrep)" ]; then
+    echo "Exiting. pcregrep is required to run the script."
+    exit

Review comment:
       exit -1 here and for all other failures

##########
File path: 
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemDelegationSAS.java
##########
@@ -64,7 +64,7 @@
       LoggerFactory.getLogger(ITestAzureBlobFileSystemDelegationSAS.class);
 
   public ITestAzureBlobFileSystemDelegationSAS() throws Exception {
-    // These tests rely on specific settings in azure-auth-keys.xml:
+    // These tests rely on specific settings in abfs-testrun-configs.xml:

Review comment:
       settings I have in azure-auth-keys still get picked up right? This is an 
addition to the current test run, not a replacement?




----------------------------------------------------------------
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: 480421)
    Time Spent: 2h  (was: 1h 50m)

> ABFS: Run the integration tests with various combinations of configurations 
> and publish a consolidated results
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-17191
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17191
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/azure, test
>    Affects Versions: 3.3.0
>            Reporter: Bilahari T H
>            Assignee: Bilahari T H
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> ADLS Gen 2 supports accounts with and without hierarchical namespace support. 
> ABFS driver supports various authorization mechanisms like OAuth, haredKey, 
> Shared Access Signature. The integration tests need to be executed against 
> accounts with and without hierarchical namespace support using various 
> authorization mechanisms.
> Currently the developer has to manually run the tests with different 
> combinations of configurations ex: HNS account with SharedKey and OAuth, 
> NonHNS account with SharedKey etc..
> The expectation is to automate these runs with different combinations. This 
> will help the developer to run the integration tests with different variants 
> of configurations automatically. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to