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

Hive QA commented on HIVE-20740:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12947502/HIVE-20740.11.patch

{color:red}ERROR:{color} -1 due to build exiting with an error

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-Build/14847/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/14847/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-14847/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Tests exited with: NonZeroExitCodeException
Command 'bash /data/hiveptest/working/scratch/source-prep.sh' failed with exit 
status 1 and output '+ date '+%Y-%m-%d %T.%3N'
2018-11-10 02:42:25.172
+ [[ -n /usr/lib/jvm/java-8-openjdk-amd64 ]]
+ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+ JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+ export 
PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ 
PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m '
+ ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m '
+ export 'MAVEN_OPTS=-Xmx1g '
+ MAVEN_OPTS='-Xmx1g '
+ cd /data/hiveptest/working/
+ tee /data/hiveptest/logs/PreCommit-HIVE-Build-14847/source-prep.txt
+ [[ false == \t\r\u\e ]]
+ mkdir -p maven ivy
+ [[ git = \s\v\n ]]
+ [[ git = \g\i\t ]]
+ [[ -z master ]]
+ [[ -d apache-github-source-source ]]
+ [[ ! -d apache-github-source-source/.git ]]
+ [[ ! -d apache-github-source-source ]]
+ date '+%Y-%m-%d %T.%3N'
2018-11-10 02:42:25.175
+ cd apache-github-source-source
+ git fetch origin
+ git reset --hard HEAD
HEAD is now at 7ae4a2c HIVE-20833: package.jdo needs to be updated to conform 
with HIVE-20221 changes (Vineet Garg, reviewed by Jason Dere)
+ git clean -f -d
Removing standalone-metastore/metastore-server/src/gen/
+ git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
+ git reset --hard origin/master
HEAD is now at 7ae4a2c HIVE-20833: package.jdo needs to be updated to conform 
with HIVE-20221 changes (Vineet Garg, reviewed by Jason Dere)
+ git merge --ff-only origin/master
Already up-to-date.
+ date '+%Y-%m-%d %T.%3N'
2018-11-10 02:42:25.935
+ rm -rf ../yetus_PreCommit-HIVE-Build-14847
+ mkdir ../yetus_PreCommit-HIVE-Build-14847
+ git gc
+ cp -R . ../yetus_PreCommit-HIVE-Build-14847
+ mkdir /data/hiveptest/logs/PreCommit-HIVE-Build-14847/yetus
+ patchCommandPath=/data/hiveptest/working/scratch/smart-apply-patch.sh
+ patchFilePath=/data/hiveptest/working/scratch/build.patch
+ [[ -f /data/hiveptest/working/scratch/build.patch ]]
+ chmod +x /data/hiveptest/working/scratch/smart-apply-patch.sh
+ /data/hiveptest/working/scratch/smart-apply-patch.sh 
/data/hiveptest/working/scratch/build.patch
error: 
a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java:
 does not exist in index
error: 
a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniHS2.java: 
does not exist in index
error: a/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java: does 
not exist in index
error: 
a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java:
 does not exist in index
error: 
a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java:
 does not exist in index
error: patch failed: 
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java:86
Falling back to three-way merge...
Applied patch to 
'standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java'
 cleanly.
Going to apply patch with: git apply -p1
error: patch failed: 
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java:86
Falling back to three-way merge...
Applied patch to 
'standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java'
 cleanly.
+ [[ maven == \m\a\v\e\n ]]
+ rm -rf /data/hiveptest/working/maven/org/apache/hive
+ mvn -B clean install -DskipTests -T 4 -q 
-Dmaven.repo.local=/data/hiveptest/working/maven
protoc-jar: executing: [/tmp/protoc7010054971666294437.exe, --version]
protoc-jar: executing: [/tmp/protoc7010054971666294437.exe, 
-I/data/hiveptest/working/apache-github-source-source/standalone-metastore/metastore-common/src/main/protobuf/org/apache/hadoop/hive/metastore,
 
--java_out=/data/hiveptest/working/apache-github-source-source/standalone-metastore/metastore-common/target/generated-sources,
 
/data/hiveptest/working/apache-github-source-source/standalone-metastore/metastore-common/src/main/protobuf/org/apache/hadoop/hive/metastore/metastore.proto]
libprotoc 2.5.0
ANTLR Parser Generator  Version 3.5.2
protoc-jar: executing: [/tmp/protoc8764510813423327091.exe, --version]
libprotoc 2.5.0
ANTLR Parser Generator  Version 3.5.2
Output file 
/data/hiveptest/working/apache-github-source-source/standalone-metastore/metastore-server/target/generated-sources/org/apache/hadoop/hive/metastore/parser/FilterParser.java
 does not exist: must build 
/data/hiveptest/working/apache-github-source-source/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/parser/Filter.g
org/apache/hadoop/hive/metastore/parser/Filter.g
log4j:WARN No appenders could be found for logger (DataNucleus.Persistence).
log4j:WARN Please initialize the log4j system properly.
DataNucleus Enhancer (version 4.1.17) for API "JDO"
DataNucleus Enhancer completed with success for 41 classes.
[ERROR] COMPILATION ERROR : 
[ERROR] 
/data/hiveptest/working/apache-github-source-source/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java:[411,39]
 cannot find symbol
  symbol:   variable Executors
  location: class org.apache.hadoop.hive.metastore.TestObjectStore
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.5.1:testCompile 
(default-testCompile) on project hive-standalone-metastore-server: Compilation 
failure
[ERROR] 
/data/hiveptest/working/apache-github-source-source/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java:[411,39]
 cannot find symbol
[ERROR] symbol:   variable Executors
[ERROR] location: class org.apache.hadoop.hive.metastore.TestObjectStore
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :hive-standalone-metastore-server
+ result=1
+ '[' 1 -ne 0 ']'
+ rm -rf yetus_PreCommit-HIVE-Build-14847
+ exit 1
'
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12947502 - PreCommit-HIVE-Build

> Remove global lock in ObjectStore.setConf method
> ------------------------------------------------
>
>                 Key: HIVE-20740
>                 URL: https://issues.apache.org/jira/browse/HIVE-20740
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Vihang Karajgaonkar
>            Assignee: Vihang Karajgaonkar
>            Priority: Major
>         Attachments: HIVE-20740.01.patch, HIVE-20740.02.patch, 
> HIVE-20740.04.patch, HIVE-20740.05.patch, HIVE-20740.06.patch, 
> HIVE-20740.08.patch, HIVE-20740.09.patch, HIVE-20740.10.patch, 
> HIVE-20740.11.patch
>
>
> The ObjectStore#setConf method has a global lock which can block other 
> clients in concurrent workloads.
> {code}
> @Override
>   @SuppressWarnings("nls")
>   public void setConf(Configuration conf) {
>     // Although an instance of ObjectStore is accessed by one thread, there 
> may
>     // be many threads with ObjectStore instances. So the static variables
>     // pmf and prop need to be protected with locks.
>     pmfPropLock.lock();
>     try {
>       isInitialized = false;
>       this.conf = conf;
>       this.areTxnStatsSupported = MetastoreConf.getBoolVar(conf, 
> ConfVars.HIVE_TXN_STATS_ENABLED);
>       configureSSL(conf);
>       Properties propsFromConf = getDataSourceProps(conf);
>       boolean propsChanged = !propsFromConf.equals(prop);
>       if (propsChanged) {
>         if (pmf != null){
>           clearOutPmfClassLoaderCache(pmf);
>           if (!forTwoMetastoreTesting) {
>             // close the underlying connection pool to avoid leaks
>             pmf.close();
>           }
>         }
>         pmf = null;
>         prop = null;
>       }
>       assert(!isActiveTransaction());
>       shutdown();
>       // Always want to re-create pm as we don't know if it were created by 
> the
>       // most recent instance of the pmf
>       pm = null;
>       directSql = null;
>       expressionProxy = null;
>       openTrasactionCalls = 0;
>       currentTransaction = null;
>       transactionStatus = TXN_STATUS.NO_STATE;
>       initialize(propsFromConf);
>       String partitionValidationRegex =
>           MetastoreConf.getVar(this.conf, 
> ConfVars.PARTITION_NAME_WHITELIST_PATTERN);
>       if (partitionValidationRegex != null && 
> !partitionValidationRegex.isEmpty()) {
>         partitionValidationPattern = 
> Pattern.compile(partitionValidationRegex);
>       } else {
>         partitionValidationPattern = null;
>       }
>       // Note, if metrics have not been initialized this will return null, 
> which means we aren't
>       // using metrics.  Thus we should always check whether this is non-null 
> before using.
>       MetricRegistry registry = Metrics.getRegistry();
>       if (registry != null) {
>         directSqlErrors = 
> Metrics.getOrCreateCounter(MetricsConstants.DIRECTSQL_ERRORS);
>       }
>       this.batchSize = MetastoreConf.getIntVar(conf, 
> ConfVars.RAWSTORE_PARTITION_BATCH_SIZE);
>       if (!isInitialized) {
>         throw new RuntimeException(
>         "Unable to create persistence manager. Check dss.log for details");
>       } else {
>         LOG.debug("Initialized ObjectStore");
>       }
>     } finally {
>       pmfPropLock.unlock();
>     }
>   }
> {code}
> The {{pmfPropLock}} is a static object and it disallows any other new 
> connection to HMS which is trying to instantiate ObjectStore. We should 
> either remove the lock or reduce the scope of the lock so that it is held for 
> a very small amount of time.



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

Reply via email to