Fixing previous rebase with trunk
diff --git a/YARN-1051-CHANGES.txt b/YARN-1051-CHANGES.txt
index 9c1ed34..7620cc3 100644
--- a/YARN-1051-CHANGES.txt
+++ b/YARN-1051-CHANGES.txt
@@ -5,10 +5,10 @@
 ReservationSystem. (Carlo Curino and Subru Krishnan via curino)
 
 YARN-1708. Public YARN APIs for creating/updating/deleting 
-reservations. (Carlo Curino and Subru Krishnan via subru)
+reservations. (Subru Krishnan and Carlo Curino  via subru)
 
 YARN-1709. In-memory data structures used to track resources over
-time to enable reservations. (Carlo Curino and Subru Krishnan via 
+time to enable reservations. (Subru Krishnan and Carlo Curino via 
 subru)
 
 YARN-1710. Logic to find allocations within a Plan that satisfy 
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
index e022dda..fe21973 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
@@ -129,6 +129,21 @@
     return context;
   }
 
+  @Public
+  @Stable
+  public static ApplicationSubmissionContext newInstance(
+      ApplicationId applicationId, String applicationName, String queue,
+      Priority priority, ContainerLaunchContext amContainer,
+      boolean isUnmanagedAM, boolean cancelTokensWhenComplete,
+      int maxAppAttempts, Resource resource, String applicationType,
+      boolean keepContainers, LogAggregationContext logAggregationContext) {
+    ApplicationSubmissionContext context =
+        newInstance(applicationId, applicationName, queue, priority,
+          amContainer, isUnmanagedAM, cancelTokensWhenComplete, maxAppAttempts,
+          resource, applicationType, keepContainers);
+    context.setLogAggregationContext(logAggregationContext);
+    return context;
+  }
   /**
    * Get the <code>ApplicationId</code> of the submitted application.
    * @return <code>ApplicationId</code> of the submitted application
@@ -406,7 +421,7 @@
   /**
    * Get the reservation id, that corresponds to a valid resource allocation in
    * the scheduler (between start and end time of the corresponding reservation)
-   * 
+   *
    * @return the reservation id representing the unique id of the corresponding
    *         reserved resource allocation in the scheduler
    */
@@ -417,7 +432,7 @@
   /**
    * Set the reservation id, that correspond to a valid resource allocation in
    * the scheduler (between start and end time of the corresponding reservation)
-   * 
+   *
    * @param reservationID representing the unique id of the
    *          corresponding reserved resource allocation in the scheduler
    */
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/yarn_protos.proto b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/yarn_protos.proto
index d07ce13..2a5029a 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/yarn_protos.proto
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/yarn_protos.proto
@@ -346,35 +346,35 @@
 ////////////////////////////////////////////////////////////////////////
 
 message ReservationIdProto {
-  optional int64 id = 1;
-  optional int64 cluster_timestamp = 2;
+optional int64 id = 1;
+optional int64 cluster_timestamp = 2;
 }
 
 message ReservationRequestProto {
-  optional ResourceProto capability = 1;
-  optional int32 num_containers = 2 [default = 1];
-  optional int32 concurrency = 3 [default = 1];
-  optional int64 duration = 4 [default = -1];
+optional ResourceProto capability = 1;
+optional int32 num_containers = 2 [default = 1];
+optional int32 concurrency = 3 [default = 1];
+optional int64 duration = 4 [default = -1];
 }
 
 message ReservationRequestsProto {
-  repeated ReservationRequestProto reservation_resources = 1;
-  optional ReservationRequestInterpreterProto interpreter = 2 [default = R_ALL];
+repeated ReservationRequestProto reservation_resources = 1;
+optional ReservationRequestInterpreterProto interpreter = 2 [default = R_ALL];
 }
 
 message ReservationDefinitionProto {
-  optional ReservationRequestsProto reservation_requests = 1;
-  optional int64 arrival = 2;
-  optional int64 deadline = 3;
-  optional string reservation_name = 4;
+optional ReservationRequestsProto reservation_requests = 1;
+optional int64 arrival = 2;
+optional int64 deadline = 3;
+optional string reservation_name = 4;
 }
 
 enum ReservationRequestInterpreterProto {
-  R_ANY = 0;
-  R_ALL = 1;
-  R_ORDER = 2;
-  R_ORDER_NO_GAP = 3;
- }
+R_ANY = 0;
+R_ALL = 1;
+R_ORDER = 2;
+R_ORDER_NO_GAP = 3;
+}
 
 ////////////////////////////////////////////////////////////////////////
 ////// From container_manager //////////////////////////////////////////
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationSubmissionContextPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationSubmissionContextPBImpl.java
index d3f940a..9462a4e 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationSubmissionContextPBImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationSubmissionContextPBImpl.java
@@ -117,8 +117,9 @@
       builder.clearApplicationTags();
       builder.addAllApplicationTags(this.applicationTags);
     }
-    if (this.reservationId != null) {
-      builder.setReservationId(convertToProtoFormat(this.reservationId));
+    if (this.logAggregationContext != null) {
+      builder.setLogAggregationContext(
+          convertToProtoFormat(this.logAggregationContext));
     }
     if (this.reservationId != null) {
       builder.setReservationId(convertToProtoFormat(this.reservationId));