From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [PATCH] chunkd: add cp command, for local intra-table copies Date: Tue, 06 Jul 2010 15:42:22 -0400 Message-ID: <4C33871E.7080203@garzik.org> References: <20100706072429.GA22866@havoc.gtf.org> <20100706091730.67ebdfee@lembas.zaitcev.lan> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=J2n57eoK2H6TEWsnZIjEfAp6L03BBWxFLH8CAZxRmcQ=; b=H7UsET2Mt/SxCy3wJxxR3Et/URohwco2ZxQqPIUxjOR+qkxxtS8fM/34wFu1Ss6nqr GU9Z3Xk1jzc0etvF1owDHKZE1dSx+8E1deNLo5K+DDviLk2pLl5lEG3Z3fDigzVrD5my v9q5oy8gSKRCuDlHg+4oMAnM5PItWl7nAAGBw= In-Reply-To: <20100706091730.67ebdfee@lembas.zaitcev.lan> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Pete Zaitcev Cc: hail-devel@vger.kernel.org On 07/06/2010 11:17 AM, Pete Zaitcev wrote: > On Tue, 6 Jul 2010 03:24:29 -0400 > Jeff Garzik wrote: > >> The following patch, against current hail.git, adds the "CP" command to >> chunkd, permitting copying from object->object inside a single table. > > What is it for? Here's a real-world example. Quoting from the S3 documentation, this describes the "PUT (copy)" operation, something that tabled does not yet support, but should: This implementation of the PUT operation creates a copy of an object that is already stored in Amazon S3. A PUT copy operation is the same as performing a GET and then a PUT. Adding the request header, x-amz-copy-source, makes the PUT operation copy the source object into the destination bucket. Assuming that a given tabled object is already fully replicated -- HOPEFULLY the common case for us -- the least expensive way to implement this is for each chunkd containing object OLD_KEY CHO_CP(object OLD_KEY -> object NEW_KEY) Assuming each chunkd node has the necessary free space, this method totally avoids using network bandwidth, when creating a copy of an object Jeff