Return-Path: Delivered-To: apmail-hadoop-pig-commits-archive@www.apache.org Received: (qmail 32150 invoked from network); 11 Feb 2010 22:21:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Feb 2010 22:21:14 -0000 Received: (qmail 30192 invoked by uid 500); 11 Feb 2010 22:21:14 -0000 Delivered-To: apmail-hadoop-pig-commits-archive@hadoop.apache.org Received: (qmail 30164 invoked by uid 500); 11 Feb 2010 22:21:14 -0000 Mailing-List: contact pig-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pig-dev@hadoop.apache.org Delivered-To: mailing list pig-commits@hadoop.apache.org Received: (qmail 30155 invoked by uid 500); 11 Feb 2010 22:21:14 -0000 Delivered-To: apmail-incubator-pig-commits@incubator.apache.org Received: (qmail 30152 invoked by uid 99); 11 Feb 2010 22:21:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2010 22:21:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2010 22:21:13 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id C7A581761F for ; Thu, 11 Feb 2010 22:20:52 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Thu, 11 Feb 2010 22:20:52 -0000 Message-ID: <20100211222052.9961.44442@eos.apache.org> Subject: =?utf-8?q?=5BPig_Wiki=5D_Update_of_=22LoadStoreMigrationGuide=22_by_Prade?= =?utf-8?q?epKamath?= Dear Wiki user, You have subscribed to a wiki page or wiki category on "Pig Wiki" for chang= e notification. The "LoadStoreMigrationGuide" page has been changed by PradeepKamath. http://wiki.apache.org/pig/LoadStoreMigrationGuide?action=3Ddiff&rev1=3D16&= rev2=3D17 -------------------------------------------------- || No equivalent method || relToAbsPathForStoreLocation() || !StoreFunc |= | Pig runtime will call this method to allow the Storer to convert a relati= ve load location to an absolute location. An implementation is provided in = !LoadFunc (as a static method) which handles this for hdfs files and direct= ories.|| || No equivalent method || checkSchema() || !StoreFunc || A Store functio= n should implement this function to check that a given schema is acceptable= to it || || No equivalent method || setStoreLocation() || !StoreFunc || This metho= d is called by Pig to communicate the store location to the storer. The sto= rer should use this method to communicate the same information to the under= lying !OutputFormat. This method is called multiple times by pig - implemen= tations should bear in mind that this method is called multiple times and s= hould ensure there are no inconsistent side effects due to the multiple cal= ls.|| - || getStorePreparationClass() || getOutputFormat() || In the old API, get= StorePreparationClass() was the means by which the implementation could com= municate to Pig the !OutputFormat to use for writing - this is now achieved= through getOutputFormat(). getOutputFormat() is NOT an optional method and= implementation SHOULD provide an !OutputFormat to use. The methods in the = !OutputFormat (and underlying !RecordWriter and !OutputCommitter) will be c= alled by pig in the same manner (and in the same context) as by Hadoop in a= map-reduce java program.|| + || getStorePreparationClass() || getOutputFormat() || !StoreFunc ||In the= old API, getStorePreparationClass() was the means by which the implementat= ion could communicate to Pig the !OutputFormat to use for writing - this is= now achieved through getOutputFormat(). getOutputFormat() is NOT an option= al method and implementation SHOULD provide an !OutputFormat to use. The me= thods in the !OutputFormat (and underlying !RecordWriter and !OutputCommitt= er) will be called by pig in the same manner (and in the same context) as b= y Hadoop in a map-reduce java program.|| || bindTo() || prepareToWrite() || !StoreFunc || bindTo() was the old met= hod which would provide an !OutputStream among other things to the !StoreFu= nc. The !StoreFunc implementation would then write to the !OutputStream in = putNext(). In the new API, writing of the data is through the !OutputFormat= provided by the !StoreFunc. So the equivalent call is prepareToWrite() whe= rein the !RecordWriter associated with the !OutputFormat provided by the !S= toreFunc is passed to the !StoreFunc. The !RecordWriter can then be used by= the implementation in putNext() to write a tuple representing a record of = data in a manner expected by the !RecordWriter. || || putNext() || putNext() || !StoreFunc || The meaning of putNext() has n= ot changed and is called by Pig runtime to write the next tuple of data - i= n the new API, this is the method wherein the implementation will use the t= he underlying !RecordWriter to write the Tuple out || || finish() || no equivalent method in !StoreFunc - implementations can u= se close() in !RecordWriter or commitTask in !OutputCommitter || !RecordWri= ter or !OutputCommitter || finish() has been removed from !StoreFunc since = the same semantics can be achieved by !RecordWriter.close() or !OutputCommi= tter.commitTask() - in the latter case !OutputCommitter.needsTaskCommit() s= hould return true.||