ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adorosz...@apache.org
Subject [47/49] ambari git commit: Merge remote-tracking branch 'origin/trunk' into ambari-rest-api-explorer
Date Tue, 23 May 2017 10:34:45 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/assemblies/server.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
index 5dfc148,05c4bad..ca9cf4c
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
@@@ -39,8 -37,9 +39,10 @@@ public class RequestRequest 
  
    private String abortReason;
  
+   private boolean removePendingHostRequests = false;
+ 
  
 +  @ApiModelProperty(name = "request_status", notes = "Only valid value is ABORTED.")
    public HostRoleStatus getStatus() {
      return status;
    }

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
index 1fc4bd5,d82ff25..f41eb26
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
@@@ -91,40 -92,42 +92,44 @@@ public class RequestResourceProvider ex
  
    // ----- Property ID constants ---------------------------------------------
    // Requests
 -  public static final String REQUEST_CLUSTER_NAME_PROPERTY_ID = "Requests/cluster_name";
 -  public static final String REQUEST_CLUSTER_ID_PROPERTY_ID = "Requests/cluster_id";
 -  public static final String REQUEST_ID_PROPERTY_ID = "Requests/id";
 -  protected static final String REQUEST_STATUS_PROPERTY_ID = "Requests/request_status";
 -  protected static final String REQUEST_ABORT_REASON_PROPERTY_ID = "Requests/abort_reason";
 -  protected static final String REQUEST_CONTEXT_ID = "Requests/request_context";
 -  public static final String REQUEST_SOURCE_SCHEDULE = "Requests/request_schedule";
 -  public static final String REQUEST_SOURCE_SCHEDULE_ID = "Requests/request_schedule/schedule_id";
 -  public static final String REQUEST_SOURCE_SCHEDULE_HREF = "Requests/request_schedule/href";
 -  protected static final String REQUEST_TYPE_ID = "Requests/type";
 -  protected static final String REQUEST_INPUTS_ID = "Requests/inputs";
 -  protected static final String REQUEST_CLUSTER_HOST_INFO_ID = "Requests/cluster_host_info";
 -  protected static final String REQUEST_RESOURCE_FILTER_ID = "Requests/resource_filters";
 -  protected static final String REQUEST_OPERATION_LEVEL_ID = "Requests/operation_level";
 -  protected static final String REQUEST_CREATE_TIME_ID = "Requests/create_time";
 -  protected static final String REQUEST_START_TIME_ID = "Requests/start_time";
 -  protected static final String REQUEST_END_TIME_ID = "Requests/end_time";
 -  protected static final String REQUEST_EXCLUSIVE_ID = "Requests/exclusive";
 -  protected static final String REQUEST_TASK_CNT_ID = "Requests/task_count";
 -  protected static final String REQUEST_FAILED_TASK_CNT_ID = "Requests/failed_task_count";
 -  protected static final String REQUEST_ABORTED_TASK_CNT_ID = "Requests/aborted_task_count";
 -  protected static final String REQUEST_TIMED_OUT_TASK_CNT_ID = "Requests/timed_out_task_count";
 -  protected static final String REQUEST_COMPLETED_TASK_CNT_ID = "Requests/completed_task_count";
 -  protected static final String REQUEST_QUEUED_TASK_CNT_ID = "Requests/queued_task_count";
 -  protected static final String REQUEST_PROGRESS_PERCENT_ID = "Requests/progress_percent";
 -  protected static final String REQUEST_REMOVE_PENDING_HOST_REQUESTS_ID = "Requests/remove_pending_host_requests";
 -  protected static final String REQUEST_PENDING_HOST_REQUEST_COUNT_ID = "Requests/pending_host_request_count";
 +  public static final String REQUESTS = "Requests";
 +  public static final String REQUEST_INFO = "RequestInfo";
 +  public static final String REQUEST_CLUSTER_NAME_PROPERTY_ID = REQUESTS + "/cluster_name";
 +  public static final String REQUEST_CLUSTER_ID_PROPERTY_ID = REQUESTS + "/cluster_id";
 +  public static final String REQUEST_ID_PROPERTY_ID = REQUESTS + "/id";
 +  public static final String REQUEST_STATUS_PROPERTY_ID = REQUESTS + "/request_status";
 +  public static final String REQUEST_ABORT_REASON_PROPERTY_ID = REQUESTS + "/abort_reason";
 +  public static final String REQUEST_CONTEXT_ID = REQUESTS + "/request_context";
 +  public static final String REQUEST_SOURCE_SCHEDULE = REQUESTS + "/request_schedule";
 +  public static final String REQUEST_SOURCE_SCHEDULE_ID = REQUESTS + "/request_schedule/schedule_id";
 +  public static final String REQUEST_SOURCE_SCHEDULE_HREF = REQUESTS + "/request_schedule/href";
 +  public static final String REQUEST_TYPE_ID = REQUESTS + "/type";
 +  public static final String REQUEST_INPUTS_ID = REQUESTS + "/inputs";
++  public static final String REQUEST_CLUSTER_HOST_INFO_ID = REQUESTS + "/cluster_host_info";
 +  public static final String REQUEST_RESOURCE_FILTER_ID = REQUESTS + "/resource_filters";
 +  public static final String REQUEST_OPERATION_LEVEL_ID = REQUESTS + "/operation_level";
 +  public static final String REQUEST_CREATE_TIME_ID = REQUESTS + "/create_time";
 +  public static final String REQUEST_START_TIME_ID = REQUESTS + "/start_time";
 +  public static final String REQUEST_END_TIME_ID = REQUESTS + "/end_time";
 +  public static final String REQUEST_EXCLUSIVE_ID = REQUESTS + "/exclusive";
 +  public static final String REQUEST_TASK_CNT_ID = REQUESTS + "/task_count";
 +  public static final String REQUEST_FAILED_TASK_CNT_ID = REQUESTS + "/failed_task_count";
 +  public static final String REQUEST_ABORTED_TASK_CNT_ID = REQUESTS + "/aborted_task_count";
 +  public static final String REQUEST_TIMED_OUT_TASK_CNT_ID = REQUESTS + "/timed_out_task_count";
 +  public static final String REQUEST_COMPLETED_TASK_CNT_ID = REQUESTS + "/completed_task_count";
 +  public static final String REQUEST_QUEUED_TASK_CNT_ID = REQUESTS + "/queued_task_count";
 +  public static final String REQUEST_PROGRESS_PERCENT_ID = REQUESTS + "/progress_percent";
++  public static final String REQUEST_REMOVE_PENDING_HOST_REQUESTS_ID = REQUESTS + "/remove_pending_host_requests";
++  public static final String REQUEST_PENDING_HOST_REQUEST_COUNT_ID = REQUESTS + "/pending_host_request_count";
 +  public static final String COMMAND_ID = "command";
 +  public static final String SERVICE_ID = "service_name";
 +  public static final String COMPONENT_ID = "component_name";
 +  public static final String HOSTS_ID = "hosts"; // This is actually a list of hosts
 +  public static final String HOSTS_PREDICATE = "hosts_predicate";
 +  public static final String ACTION_ID = "action";
 +  public static final String INPUTS_ID = "parameters";
 +  public static final String EXLUSIVE_ID = "exclusive";
+ 
 -  protected static final String COMMAND_ID = "command";
 -  protected static final String SERVICE_ID = "service_name";
 -  protected static final String COMPONENT_ID = "component_name";
 -  protected static final String HOSTS_ID = "hosts"; // This is actually a list of hosts
 -  protected static final String HOSTS_PREDICATE = "hosts_predicate";
 -  protected static final String ACTION_ID = "action";
 -  protected static final String INPUTS_ID = "parameters";
 -  protected static final String EXLUSIVE_ID = "exclusive";
    private static Set<String> pkPropertyIds =
      new HashSet<>(Arrays.asList(new String[]{
        REQUEST_ID_PROPERTY_ID}));

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
----------------------------------------------------------------------
diff --cc ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index 7e4c4c2,cbd5de3..83ba0bb
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@@ -8998,9 -9017,11 +8997,11 @@@ public class AmbariManagementController
  
      Assert.assertNull(topologyHostInfoDAO.findByHostname(host1));
  
+     Long firstHostId = clusters.getHost(host1).getHostId();
+ 
      // Deletion without specifying cluster should be successful
      requests.clear();
 -    requests.add(new HostRequest(host1, null, null));
 +    requests.add(new HostRequest(host1, null));
      try {
        HostResourceProviderTest.deleteHosts(controller, requests);
      } catch (Exception e) {
@@@ -9011,9 -9032,13 +9012,13 @@@
      Assert.assertFalse(clusters.getClustersForHost(host1).contains(cluster));
      Assert.assertNull(topologyHostInfoDAO.findByHostname(host1));
  
+     // verify there are no host role commands for the host
+     List<HostRoleCommandEntity> tasks = hostRoleCommandDAO.findByHostId(firstHostId);
+     assertEquals(0, tasks.size());
+ 
      // Case 3: Delete host that is still part of the cluster, and specify the cluster_name
in the request
      requests.clear();
 -    requests.add(new HostRequest(host2, cluster1, null));
 +    requests.add(new HostRequest(host2, cluster1));
      try {
        HostResourceProviderTest.deleteHosts(controller, requests);
      } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
----------------------------------------------------------------------
diff --cc ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
index 01dd8e3,8772b24..78752dc
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
@@@ -1127,9 -1145,11 +1127,11 @@@ public class HostResourceProviderTest e
      HostResponse response = createNiceMock(HostResponse.class);
  
      Set<Cluster> setCluster = Collections.singleton(cluster);
+     Map<String, DesiredConfig> desiredConfigs = new HashMap<>();
+     Map<String, HostConfig> desiredHostConfigs = new HashMap<>();
  
      // requests
 -    HostRequest request1 = new HostRequest("host1", "cluster1", Collections.<String,
String>emptyMap());
 +    HostRequest request1 = new HostRequest("host1", "cluster1");
  
      Set<HostRequest> setRequests = new HashSet<>();
      setRequests.add(request1);

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ScaleClusterRequestTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-web/pom.xml
----------------------------------------------------------------------


Mime
View raw message