You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tajo.apache.org by ji...@apache.org on 2015/05/30 06:05:05 UTC
[03/24] tajo git commit: TAJO-1621: Compilation error with hadoop
2.7.0. (jinho)
TAJO-1621: Compilation error with hadoop 2.7.0. (jinho)
Closes #586
Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/1872df94
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/1872df94
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/1872df94
Branch: refs/heads/index_support
Commit: 1872df94355bed50a3ac55ffd7632ab532bdb506
Parents: 25bd5cb
Author: Jinho Kim <jh...@apache.org>
Authored: Wed May 27 11:04:43 2015 +0900
Committer: Jinho Kim <jh...@apache.org>
Committed: Wed May 27 11:04:43 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/1872df94/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index c79a185..58944a5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -136,6 +136,8 @@ Release 0.11.0 - unreleased
BUG FIXES
+ TAJO-1621: Compilation error with hadoop 2.7.0. (jinho)
+
TAJO-1619: JDBC program is stuck after closing. (jihoon)
TAJO-1620: random() in an SQL should generate RANDOM numbers.
http://git-wip-us.apache.org/repos/asf/tajo/blob/1872df94/tajo-core/pom.xml
----------------------------------------------------------------------
diff --git a/tajo-core/pom.xml b/tajo-core/pom.xml
index c9367b2..4b3936e 100644
--- a/tajo-core/pom.xml
+++ b/tajo-core/pom.xml
@@ -585,6 +585,7 @@
<configuration combine.self="override">
<forkCount>${maven.fork.count}</forkCount>
<reuseForks>true</reuseForks>
+ <trimStackTrace>false</trimStackTrace>
<argLine>-Xms512m -Xmx1024m -XX:MaxPermSize=152m -Dfile.encoding=UTF-8</argLine>
<useSystemClassLoader>true</useSystemClassLoader>
<useManifestOnlyJar>true</useManifestOnlyJar>
http://git-wip-us.apache.org/repos/asf/tajo/blob/1872df94/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/1872df94/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/1872df94/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 fcb9b58..f4818f6 100644
--- a/tajo-core/src/test/java/org/apache/tajo/TajoTestingCluster.java
+++ b/tajo-core/src/test/java/org/apache/tajo/TajoTestingCluster.java
@@ -509,6 +509,7 @@ public class TajoTestingCluster {
startMiniDFSCluster(numDataNodes, clusterTestBuildDir, dataNodeHosts);
this.dfsCluster.waitClusterUp();
+ conf.setInt("hbase.hconnection.threads.core", 50);
hbaseUtil = new HBaseTestClusterUtil(conf, clusterTestBuildDir);
startMiniTajoCluster(this.clusterTestBuildDir, numSlaves, false);