Return-Path: X-Original-To: apmail-incubator-ambari-user-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 867C610C14 for ; Tue, 8 Oct 2013 20:22:58 +0000 (UTC) Received: (qmail 80189 invoked by uid 500); 8 Oct 2013 20:22:56 -0000 Delivered-To: apmail-incubator-ambari-user-archive@incubator.apache.org Received: (qmail 80035 invoked by uid 500); 8 Oct 2013 20:22:53 -0000 Mailing-List: contact ambari-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-user@incubator.apache.org Delivered-To: mailing list ambari-user@incubator.apache.org Received: (qmail 79902 invoked by uid 99); 8 Oct 2013 20:22:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Oct 2013 20:22:50 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tbeerbower@hortonworks.com designates 209.85.213.177 as permitted sender) Received: from [209.85.213.177] (HELO mail-ye0-f177.google.com) (209.85.213.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Oct 2013 20:22:42 +0000 Received: by mail-ye0-f177.google.com with SMTP id q9so2072622yen.36 for ; Tue, 08 Oct 2013 13:22:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type; bh=kF4D7n7Dp+UpKtc9X0lSfLIC4CATSABnlOBre0tuDmI=; b=WKW3fwGOuN6wOqeN6gOZ0b5U5sd3kh0ZqqgyuVT3zr/ta+XETFn5qTOFQGzrkxNKTX pDs9NYwl0TX9mDCzp7P867m8tFVg4vOjyW97gpHQ00+vtHuCPTaoERVqasd8OiyCzDTw vO3A+MZerTrqRrj6gjF2wa3/NSruB9e2A7V+d/i2nGSLF4515KAd266rqZFs3NOfdtyN qBVOrNQJQ4R28QuxMO2L7DVXGyETuF/rsro7Rhfor0AQlYlxc1CP+FovYU8AhNRc8R70 agawVYJ7aMjr5n31t6JorjKE1Aqt4ApnDCng+zxOrLyzi4EgvNbDBB+udQ7H7IK4LQOc v9yA== X-Gm-Message-State: ALoCoQkN9MXS5544TKckG2RBRvk0OwO7eORhJq5uhziJdr5Pk2iqSnDBDhRl4CGbb7RNNrtL40LNHreV9/SQHMLQblxlmiMwG/G06I3shKBmcwYIF2dOIMY= X-Received: by 10.236.73.1 with SMTP id u1mr216188yhd.91.1381263741747; Tue, 08 Oct 2013 13:22:21 -0700 (PDT) Received: from new-host-2.home (pool-98-114-146-150.phlapa.fios.verizon.net. [98.114.146.150]) by mx.google.com with ESMTPSA id u43sm54907074yhb.4.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Oct 2013 13:22:21 -0700 (PDT) Message-ID: <52546977.90403@hortonworks.com> Date: Tue, 08 Oct 2013 16:22:15 -0400 From: Tom Beerbower User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: ambari-user@incubator.apache.org Subject: Re: How to update service state on specific hosts? References: In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org Hi Christian, If I understand correctly you want to set the state of a component on a specific host. If so, here is an example from the docs ... Start the NAMENODE component by updating its state to 'STARTED'. PUT api/v1/clusters/c1/hosts/hostname/host_components/NAMENODE { "HostRoles":{ "state":"STARTED" } } 202 Accepted { "href" : "http://your.ambari.server:8080/api/v1/clusters/c1/requests/12", "Requests" : { "id" : 12, "status" : "InProgress" } } Thanks, Tom On 10/8/13 4:13 PM, Christian Smith wrote: > Hi, > > I have a scenario where I have an existing cluster with all the > services installed and started. I then add one or more slaves to the > existing cluster. > > I'm wondering if there' s an easy way for me to set the > service/component states to INSTALLED then STARTED just for the new > hosts? When installing the cluster I use something like PUT > state=INSTALLED to > /api/v1/clusters/c1/services?ServiceInfo/state=INIT, but obviously I > can't use this on a running cluster. > > I've tried various predicates like selecting just the hostnames I need > for a component, but the predicate isn't supported. > > For example, this fails > > /api/v1/clusters/c1/services/HDFS/components/DATANODE?host_components/HostRoles/host_name=my-hostname > > I know I can iterate through each host, but this is slow... > > Thanks in advance, > Christian -- CONFIDENTIALITY NOTICE NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.