Revert previous commit - accidentally included two changes.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1386783 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eli Collins 2012-09-17 19:28:14 +00:00
parent 8a9debd0ef
commit 4d2e77bc1c
3 changed files with 13 additions and 15 deletions

View File

@ -109,7 +109,6 @@ add_executable(test_bulk_crc32
) )
set_property(SOURCE main.cpp PROPERTY INCLUDE_DIRECTORIES "\"-Werror\" \"-Wall\"") set_property(SOURCE main.cpp PROPERTY INCLUDE_DIRECTORIES "\"-Werror\" \"-Wall\"")
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
add_dual_library(hadoop add_dual_library(hadoop
${D}/io/compress/lz4/Lz4Compressor.c ${D}/io/compress/lz4/Lz4Compressor.c
${D}/io/compress/lz4/Lz4Decompressor.c ${D}/io/compress/lz4/Lz4Decompressor.c
@ -126,17 +125,6 @@ add_dual_library(hadoop
${D}/util/NativeCrc32.c ${D}/util/NativeCrc32.c
${D}/util/bulk_crc32.c ${D}/util/bulk_crc32.c
) )
IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
#
# By embedding '$ORIGIN' into the RPATH of libhadoop.so,
# dlopen will look in the directory containing libhadoop.so.
# However, $ORIGIN is not supported by all operating systems.
#
SET_TARGET_PROPERTIES(hadoop
PROPERTIES INSTALL_RPATH "\$ORIGIN/")
ENDIF()
target_link_dual_libraries(hadoop target_link_dual_libraries(hadoop
dl dl
${JAVA_JVM_LIBRARY} ${JAVA_JVM_LIBRARY}

View File

@ -17,6 +17,9 @@
*/ */
package org.apache.hadoop.util; package org.apache.hadoop.util;
import java.io.PrintWriter;
import java.io.StringWriter;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceAudience;
@ -101,7 +104,10 @@ public final class ExitUtil {
* @throws ExitException if System.exit is disabled for test purposes * @throws ExitException if System.exit is disabled for test purposes
*/ */
public static void terminate(int status, Throwable t) throws ExitException { public static void terminate(int status, Throwable t) throws ExitException {
terminate(status, StringUtils.stringifyException(t)); StringWriter sw = new StringWriter();
t.printStackTrace(new PrintWriter(sw));
terminate(status, "Fatal exception with message " + t.getMessage() +
"\nstack trace\n" + sw.toString());
} }
/** /**

View File

@ -31,7 +31,9 @@ import java.io.File;
import java.io.FilenameFilter; import java.io.FilenameFilter;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.PrintWriter;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;
import java.io.StringWriter;
import java.net.URI; import java.net.URI;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -1236,8 +1238,10 @@ public class TestEditLog {
} }
} catch (IOException e) { } catch (IOException e) {
} catch (Throwable t) { } catch (Throwable t) {
fail("Caught non-IOException throwable " + StringWriter sw = new StringWriter();
StringUtils.stringifyException(t)); t.printStackTrace(new PrintWriter(sw));
fail("caught non-IOException throwable with message " +
t.getMessage() + "\nstack trace\n" + sw.toString());
} }
} finally { } finally {
if ((elfos != null) && (elfos.isOpen())) if ((elfos != null) && (elfos.isOpen()))