Repository: tajo Updated Branches: refs/heads/branch-0.10.2 d3ed36a39 -> 942dffd35
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/942dffd3 Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/942dffd3 Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/942dffd3 Branch: refs/heads/branch-0.10.2 Commit: 942dffd358cee36125fd0894ef4174675a37c229 Parents: d3ed36a Author: Jinho Kim <[email protected]> Authored: Wed May 27 10:57:56 2015 +0900 Committer: Jinho Kim <[email protected]> Committed: Wed May 27 10:57:56 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/942dffd3/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 50b735c..c91c129 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-1612: TestKillQuery occassionally fails. (hyunsik) TAJO-1440: Some tests fail in parallel test environment in TestKillQuery. http://git-wip-us.apache.org/repos/asf/tajo/blob/942dffd3/tajo-core/pom.xml ---------------------------------------------------------------------- diff --git a/tajo-core/pom.xml b/tajo-core/pom.xml index 1d4dc58..a6ea1d7 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/942dffd3/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/942dffd3/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/942dffd3/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) {
