You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tajo.apache.org by jh...@apache.org on 2015/05/27 03:52:43 UTC
tajo git commit: TAJO-1621: Compilation error with hadoop 2.7.0.
(jinho)
Repository: tajo
Updated Branches:
refs/heads/branch-0.10.1 985f61d6b -> 808d0e782
TAJO-1621: Compilation error with hadoop 2.7.0. (jinho)
Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/808d0e78
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/808d0e78
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/808d0e78
Branch: refs/heads/branch-0.10.1
Commit: 808d0e782a33ca2b2488facf0890418d6e2fac05
Parents: 985f61d
Author: Jinho Kim <jh...@apache.org>
Authored: Wed May 27 10:51:48 2015 +0900
Committer: Jinho Kim <jh...@apache.org>
Committed: Wed May 27 10:51:48 2015 +0900
----------------------------------------------------------------------
CHANGES | 2 +
tajo-core/pom.xml | 1 +
.../apache/tajo/engine/utils/ThreadUtil.java | 149 -------------------
.../org/apache/tajo/ha/HdfsServiceTracker.java | 13 +-
.../org/apache/tajo/TajoTestingCluster.java | 1 +
5 files changed, 11 insertions(+), 155 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tajo/blob/808d0e78/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 5baaa53..4603f3e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -40,6 +40,8 @@ Release 0.10.1 - unreleased
BUG FIXES
+ TAJO-1621: Compilation error with hadoop 2.7.0. (jinho)
+
TAJO-1619: JDBC program is stuck after closing. (jihoon)
TAJO-1612: TestKillQuery occassionally fails. (hyunsik)
http://git-wip-us.apache.org/repos/asf/tajo/blob/808d0e78/tajo-core/pom.xml
----------------------------------------------------------------------
diff --git a/tajo-core/pom.xml b/tajo-core/pom.xml
index bc11d1c..15c3e86 100644
--- a/tajo-core/pom.xml
+++ b/tajo-core/pom.xml
@@ -733,6 +733,7 @@
<configuration combine.self="override">
<forkCount>${maven.fork.count}</forkCount>
<reuseForks>true</reuseForks>
+ <trimStackTrace>false</trimStackTrace>
<argLine>-Xms512m -Xmx1024m -XX:MaxPermSize=128m -Dfile.encoding=UTF-8</argLine>
<useSystemClassLoader>true</useSystemClassLoader>
<useManifestOnlyJar>true</useManifestOnlyJar>
http://git-wip-us.apache.org/repos/asf/tajo/blob/808d0e78/tajo-core/src/main/java/org/apache/tajo/engine/utils/ThreadUtil.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/main/java/org/apache/tajo/engine/utils/ThreadUtil.java b/tajo-core/src/main/java/org/apache/tajo/engine/utils/ThreadUtil.java
deleted file mode 100644
index 23b1e5d..0000000
--- a/tajo-core/src/main/java/org/apache/tajo/engine/utils/ThreadUtil.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.tajo.engine.utils;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.util.ReflectionUtils;
-
-import java.io.PrintWriter;
-import java.lang.Thread.UncaughtExceptionHandler;
-
-public class ThreadUtil {
- protected static final Log LOG = LogFactory.getLog(ThreadUtil.class);
-
- /**
- * Utility method that sets name, daemon status and starts passed thread.
- * @param t thread to run
- * @return Returns the passed Thread <code>t</code>.
- */
- public static Thread setDaemonThreadRunning(final Thread t) {
- return setDaemonThreadRunning(t, t.getName());
- }
-
- /**
- * Utility method that sets name, daemon status and starts passed thread.
- * @param t thread to frob
- * @param name new name
- * @return Returns the passed Thread <code>t</code>.
- */
- public static Thread setDaemonThreadRunning(final Thread t,
- final String name) {
- return setDaemonThreadRunning(t, name, null);
- }
-
- /**
- * Utility method that sets name, daemon status and starts passed thread.
- * @param t thread to frob
- * @param name new name
- * @param handler A handler to set on the thread. Pass null if want to
- * use default handler.
- * @return Returns the passed Thread <code>t</code>.
- */
- public static Thread setDaemonThreadRunning(final Thread t,
- final String name, final UncaughtExceptionHandler handler) {
- t.setName(name);
- if (handler != null) {
- t.setUncaughtExceptionHandler(handler);
- }
- t.setDaemon(true);
- t.start();
- return t;
- }
-
- /**
- * Shutdown passed thread using isAlive and join.
- * @param t Thread to shutdown
- */
- public static void shutdown(final Thread t) {
- shutdown(t, 0);
- }
-
- /**
- * Shutdown passed thread using isAlive and join.
- * @param joinwait Pass 0 if we're to wait forever.
- * @param t Thread to shutdown
- */
- public static void shutdown(final Thread t, final long joinwait) {
- if (t == null) return;
- while (t.isAlive()) {
- try {
- t.join(joinwait);
- } catch (InterruptedException e) {
- LOG.warn(t.getName() + "; joinwait=" + joinwait, e);
- }
- }
- }
-
-
- /**
- * @param t Waits on the passed thread to die dumping a threaddump every
- * minute while its up.
- * @throws InterruptedException
- */
- public static void threadDumpingIsAlive(final Thread t)
- throws InterruptedException {
- if (t == null) {
- return;
- }
-
- while (t.isAlive()) {
- t.join(60 * 1000);
- if (t.isAlive()) {
- ReflectionUtils.printThreadInfo(new PrintWriter(System.out),
- "Automatic Stack Trace every 60 seconds waiting on " +
- t.getName());
- }
- }
- }
-
- /**
- * @param millis How long to sleep for in milliseconds.
- */
- public static void sleep(int millis) {
- try {
- Thread.sleep(millis);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Sleeps for the given amount of time even if interrupted. Preserves
- * the interrupt status.
- * @param msToWait the amount of time to sleep in milliseconds
- */
- public static void sleepWithoutInterrupt(final long msToWait) {
- long timeMillis = System.currentTimeMillis();
- long endTime = timeMillis + msToWait;
- boolean interrupted = false;
- while (timeMillis < endTime) {
- try {
- Thread.sleep(endTime - timeMillis);
- } catch (InterruptedException ex) {
- interrupted = true;
- }
- timeMillis = System.currentTimeMillis();
- }
-
- if (interrupted) {
- Thread.currentThread().interrupt();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/tajo/blob/808d0e78/tajo-core/src/main/java/org/apache/tajo/ha/HdfsServiceTracker.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/main/java/org/apache/tajo/ha/HdfsServiceTracker.java b/tajo-core/src/main/java/org/apache/tajo/ha/HdfsServiceTracker.java
index 5f1aff8..d0eb985 100644
--- a/tajo-core/src/main/java/org/apache/tajo/ha/HdfsServiceTracker.java
+++ b/tajo-core/src/main/java/org/apache/tajo/ha/HdfsServiceTracker.java
@@ -350,6 +350,13 @@ public class HdfsServiceTracker extends HAServiceTracker {
@Override
public void run() {
while (!stopped && !Thread.currentThread().isInterrupted()) {
+ try {
+ Thread.sleep(monitorInterval);
+ } catch (InterruptedException e) {
+ LOG.info("PingChecker interrupted. - masterName:" + masterName);
+ break;
+ }
+
synchronized (HdfsServiceTracker.this) {
try {
if (!currentActiveMaster.equals(masterName)) {
@@ -371,12 +378,6 @@ public class HdfsServiceTracker extends HAServiceTracker {
e.printStackTrace();
}
}
- try {
- Thread.sleep(monitorInterval);
- } catch (InterruptedException e) {
- LOG.info("PingChecker interrupted. - masterName:" + masterName);
- break;
- }
}
}
}
http://git-wip-us.apache.org/repos/asf/tajo/blob/808d0e78/tajo-core/src/test/java/org/apache/tajo/TajoTestingCluster.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/test/java/org/apache/tajo/TajoTestingCluster.java b/tajo-core/src/test/java/org/apache/tajo/TajoTestingCluster.java
index 17348e1..79a5944 100644
--- a/tajo-core/src/test/java/org/apache/tajo/TajoTestingCluster.java
+++ b/tajo-core/src/test/java/org/apache/tajo/TajoTestingCluster.java
@@ -510,6 +510,7 @@ public class TajoTestingCluster {
startMiniDFSCluster(numDataNodes, clusterTestBuildDir, dataNodeHosts);
this.dfsCluster.waitClusterUp();
+ conf.setInt("hbase.hconnection.threads.core", 50);
hbaseUtil = new HBaseTestClusterUtil(conf, clusterTestBuildDir);
if(!standbyWorkerMode) {