ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject [02/10] git commit: - misc updates
Date Mon, 22 Sep 2014 18:29:16 GMT
- misc updates

Project: http://git-wip-us.apache.org/repos/asf/incubator-argus/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-argus/commit/f7c934cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-argus/tree/f7c934cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-argus/diff/f7c934cf

Branch: refs/heads/master
Commit: f7c934cf47ca566530badd821a54eaf4481db197
Parents: be47e64
Author: mneethiraj <mneethiraj@hortonworks.com>
Authored: Fri Sep 19 00:09:43 2014 -0700
Committer: mneethiraj <mneethiraj@hortonworks.com>
Committed: Fri Sep 19 00:09:43 2014 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/log4j/HdfsLogDestination.java        | 2 +-
 .../src/main/java/org/apache/log4j/LocalFileLogBuffer.java        | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/f7c934cf/agents-common/src/main/java/org/apache/log4j/HdfsLogDestination.java
----------------------------------------------------------------------
diff --git a/agents-common/src/main/java/org/apache/log4j/HdfsLogDestination.java b/agents-common/src/main/java/org/apache/log4j/HdfsLogDestination.java
index ec53977..27def91 100644
--- a/agents-common/src/main/java/org/apache/log4j/HdfsLogDestination.java
+++ b/agents-common/src/main/java/org/apache/log4j/HdfsLogDestination.java
@@ -119,7 +119,6 @@ public class HdfsLogDestination implements LogDestination<String>
{
 		if(writer != null) {
 			try {
 				writer.write(log + LINE_SEPARATOR);
-				writer.flush();
 
 				ret = true;
 			} catch (IOException excp) {
@@ -217,6 +216,7 @@ public class HdfsLogDestination implements LogDestination<String>
{
 
 		if(writer != null) {
 			try {
+				writer.flush();
 				writer.close();
 			} catch(IOException excp) {
 				LogLog.warn("HdfsLogDestination: failed to close file " + mCurrentFilename, excp);

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/f7c934cf/agents-common/src/main/java/org/apache/log4j/LocalFileLogBuffer.java
----------------------------------------------------------------------
diff --git a/agents-common/src/main/java/org/apache/log4j/LocalFileLogBuffer.java b/agents-common/src/main/java/org/apache/log4j/LocalFileLogBuffer.java
index f52f042..df50f8d 100644
--- a/agents-common/src/main/java/org/apache/log4j/LocalFileLogBuffer.java
+++ b/agents-common/src/main/java/org/apache/log4j/LocalFileLogBuffer.java
@@ -207,7 +207,7 @@ public class LocalFileLogBuffer implements LogBuffer<String> {
 
 			updateNextRolloverTime();
 		} else {
-			LogLog.warn("LocalFileLogBuffer.openFile(): failed to open file for write" + mCurrentFilename);
+			LogLog.warn("LocalFileLogBuffer.openFile(): failed to open file for write " + mCurrentFilename);
 
 			mCurrentFilename = null;
 		}
@@ -224,6 +224,7 @@ public class LocalFileLogBuffer implements LogBuffer<String> {
 
 		if(writer != null) {
 			try {
+				writer.flush();
 				writer.close();
 			} catch(IOException excp) {
 				LogLog.warn("LocalFileLogBuffer: failed to close file " + mCurrentFilename, excp);


Mime
View raw message