hadoop git commit: YARN-7194. Log aggregation status is always Failed with the newly added log aggregation IndexedFileFormat. Contributed by Xuan Gong.

2017-10-02 Thread xgong
Repository: hadoop
Updated Branches:
  refs/heads/branch-3.0 eb76d3dbe -> aef3e4b6a


YARN-7194. Log aggregation status is always Failed with the newly added log 
aggregation IndexedFileFormat. Contributed by Xuan Gong.

(cherry picked from commit c92c1d521eadfd8a4cd8205cc6aee74816f353f4)


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

Branch: refs/heads/branch-3.0
Commit: aef3e4b6af0368bfdc47fbdca3899d337e0d94bf
Parents: eb76d3d
Author: Junping Du 
Authored: Wed Sep 13 22:16:06 2017 -0700
Committer: Xuan 
Committed: Mon Oct 2 16:35:27 2017 -0700

--
 .../ifile/LogAggregationIndexedFileController.java | 3 ++-
 .../ifile/TestLogAggregationIndexFileController.java   | 6 ++
 2 files changed, 4 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/aef3e4b6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
--
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
index 6cb2062..243945e 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
@@ -392,7 +392,8 @@ public class LogAggregationIndexedFileController
 this.fsDataOStream.writeInt(length);
 byte[] separator = this.uuid.getBytes(Charset.forName("UTF-8"));
 this.fsDataOStream.write(separator);
-if (logAggregationSuccessfullyInThisCyCle) {
+if (logAggregationSuccessfullyInThisCyCle &&
+record.isLogAggregationInRolling()) {
   deleteFileWithRetries(fc, ugi, remoteLogCheckSumFile);
 }
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/aef3e4b6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
--
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
index 5f61710..f77ad96 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
@@ -164,9 +164,7 @@ public class TestLogAggregationIndexFileController {
 fileFormat.initializeWriter(context);
 
 fileFormat.write(key1, value);
-LogAggregationFileControllerContext record = mock(
-LogAggregationFileControllerContext.class);
-fileFormat.postWrite(record);
+fileFormat.postWrite(context);
 fileFormat.closeWriter();
 
 ContainerLogsRequest logRequest = new ContainerLogsRequest();
@@ -267,7 +265,7 @@ public class TestLogAggregationIndexFileController {
 // first write and second write
 fileFormat.initializeWriter(context);
 fileFormat.write(key1, value2);
-fileFormat.postWrite(record);
+fileFormat.postWrite(context);
 fileFormat.closeWriter();
 fileFormat.readAggregatedLogsMeta(
 logRequest);


-
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org



[13/50] [abbrv] hadoop git commit: YARN-7194. Log aggregation status is always Failed with the newly added log aggregation IndexedFileFormat. Contributed by Xuan Gong.

2017-09-15 Thread haibochen
YARN-7194. Log aggregation status is always Failed with the newly added log 
aggregation IndexedFileFormat. Contributed by Xuan Gong.


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

Branch: refs/heads/YARN-1011
Commit: c92c1d521eadfd8a4cd8205cc6aee74816f353f4
Parents: e0b3c64
Author: Junping Du 
Authored: Wed Sep 13 22:16:06 2017 -0700
Committer: Junping Du 
Committed: Wed Sep 13 22:16:06 2017 -0700

--
 .../ifile/LogAggregationIndexedFileController.java | 3 ++-
 .../ifile/TestLogAggregationIndexFileController.java   | 6 ++
 2 files changed, 4 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c92c1d52/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
--
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
index 6cb2062..243945e 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
@@ -392,7 +392,8 @@ public class LogAggregationIndexedFileController
 this.fsDataOStream.writeInt(length);
 byte[] separator = this.uuid.getBytes(Charset.forName("UTF-8"));
 this.fsDataOStream.write(separator);
-if (logAggregationSuccessfullyInThisCyCle) {
+if (logAggregationSuccessfullyInThisCyCle &&
+record.isLogAggregationInRolling()) {
   deleteFileWithRetries(fc, ugi, remoteLogCheckSumFile);
 }
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/c92c1d52/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
--
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
index 5f61710..f77ad96 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
@@ -164,9 +164,7 @@ public class TestLogAggregationIndexFileController {
 fileFormat.initializeWriter(context);
 
 fileFormat.write(key1, value);
-LogAggregationFileControllerContext record = mock(
-LogAggregationFileControllerContext.class);
-fileFormat.postWrite(record);
+fileFormat.postWrite(context);
 fileFormat.closeWriter();
 
 ContainerLogsRequest logRequest = new ContainerLogsRequest();
@@ -267,7 +265,7 @@ public class TestLogAggregationIndexFileController {
 // first write and second write
 fileFormat.initializeWriter(context);
 fileFormat.write(key1, value2);
-fileFormat.postWrite(record);
+fileFormat.postWrite(context);
 fileFormat.closeWriter();
 fileFormat.readAggregatedLogsMeta(
 logRequest);


-
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org



hadoop git commit: YARN-7194. Log aggregation status is always Failed with the newly added log aggregation IndexedFileFormat. Contributed by Xuan Gong.

2017-09-13 Thread junping_du
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 f525dfc5e -> 7e6cc1713


YARN-7194. Log aggregation status is always Failed with the newly added log 
aggregation IndexedFileFormat. Contributed by Xuan Gong.

(cherry picked from commit c92c1d521eadfd8a4cd8205cc6aee74816f353f4)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/7e6cc171
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/7e6cc171
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/7e6cc171

Branch: refs/heads/branch-2
Commit: 7e6cc17133dc2b87f1a9ed8fec3f156267095f7d
Parents: f525dfc
Author: Junping Du 
Authored: Wed Sep 13 22:16:06 2017 -0700
Committer: Junping Du 
Committed: Wed Sep 13 22:18:39 2017 -0700

--
 .../ifile/LogAggregationIndexedFileController.java | 3 ++-
 .../ifile/TestLogAggregationIndexFileController.java   | 6 ++
 2 files changed, 4 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/7e6cc171/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
--
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
index 6cb2062..243945e 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
@@ -392,7 +392,8 @@ public class LogAggregationIndexedFileController
 this.fsDataOStream.writeInt(length);
 byte[] separator = this.uuid.getBytes(Charset.forName("UTF-8"));
 this.fsDataOStream.write(separator);
-if (logAggregationSuccessfullyInThisCyCle) {
+if (logAggregationSuccessfullyInThisCyCle &&
+record.isLogAggregationInRolling()) {
   deleteFileWithRetries(fc, ugi, remoteLogCheckSumFile);
 }
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7e6cc171/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
--
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
index 5f61710..f77ad96 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
@@ -164,9 +164,7 @@ public class TestLogAggregationIndexFileController {
 fileFormat.initializeWriter(context);
 
 fileFormat.write(key1, value);
-LogAggregationFileControllerContext record = mock(
-LogAggregationFileControllerContext.class);
-fileFormat.postWrite(record);
+fileFormat.postWrite(context);
 fileFormat.closeWriter();
 
 ContainerLogsRequest logRequest = new ContainerLogsRequest();
@@ -267,7 +265,7 @@ public class TestLogAggregationIndexFileController {
 // first write and second write
 fileFormat.initializeWriter(context);
 fileFormat.write(key1, value2);
-fileFormat.postWrite(record);
+fileFormat.postWrite(context);
 fileFormat.closeWriter();
 fileFormat.readAggregatedLogsMeta(
 logRequest);


-
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org



hadoop git commit: YARN-7194. Log aggregation status is always Failed with the newly added log aggregation IndexedFileFormat. Contributed by Xuan Gong.

2017-09-13 Thread junping_du
Repository: hadoop
Updated Branches:
  refs/heads/trunk e0b3c644e -> c92c1d521


YARN-7194. Log aggregation status is always Failed with the newly added log 
aggregation IndexedFileFormat. Contributed by Xuan Gong.


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

Branch: refs/heads/trunk
Commit: c92c1d521eadfd8a4cd8205cc6aee74816f353f4
Parents: e0b3c64
Author: Junping Du 
Authored: Wed Sep 13 22:16:06 2017 -0700
Committer: Junping Du 
Committed: Wed Sep 13 22:16:06 2017 -0700

--
 .../ifile/LogAggregationIndexedFileController.java | 3 ++-
 .../ifile/TestLogAggregationIndexFileController.java   | 6 ++
 2 files changed, 4 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c92c1d52/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
--
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
index 6cb2062..243945e 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/LogAggregationIndexedFileController.java
@@ -392,7 +392,8 @@ public class LogAggregationIndexedFileController
 this.fsDataOStream.writeInt(length);
 byte[] separator = this.uuid.getBytes(Charset.forName("UTF-8"));
 this.fsDataOStream.write(separator);
-if (logAggregationSuccessfullyInThisCyCle) {
+if (logAggregationSuccessfullyInThisCyCle &&
+record.isLogAggregationInRolling()) {
   deleteFileWithRetries(fc, ugi, remoteLogCheckSumFile);
 }
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/c92c1d52/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
--
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
index 5f61710..f77ad96 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/filecontroller/ifile/TestLogAggregationIndexFileController.java
@@ -164,9 +164,7 @@ public class TestLogAggregationIndexFileController {
 fileFormat.initializeWriter(context);
 
 fileFormat.write(key1, value);
-LogAggregationFileControllerContext record = mock(
-LogAggregationFileControllerContext.class);
-fileFormat.postWrite(record);
+fileFormat.postWrite(context);
 fileFormat.closeWriter();
 
 ContainerLogsRequest logRequest = new ContainerLogsRequest();
@@ -267,7 +265,7 @@ public class TestLogAggregationIndexFileController {
 // first write and second write
 fileFormat.initializeWriter(context);
 fileFormat.write(key1, value2);
-fileFormat.postWrite(record);
+fileFormat.postWrite(context);
 fileFormat.closeWriter();
 fileFormat.readAggregatedLogsMeta(
 logRequest);


-
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org