Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Pig Wiki" for change 
notification.

The "LoadStoreMigrationGuide" page has been changed by PradeepKamath.
http://wiki.apache.org/pig/LoadStoreMigrationGuide?action=diff&rev1=16&rev2=17

--------------------------------------------------

  || No equivalent method || relToAbsPathForStoreLocation() || !StoreFunc || 
Pig runtime will call this method to allow the Storer to convert a relative 
load location to an absolute location. An implementation is provided in 
!LoadFunc (as a static method) which handles this for hdfs files and 
directories.||
  || No equivalent method || checkSchema() || !StoreFunc || A Store function 
should implement this function to check that a given schema is acceptable to it 
||
  || No equivalent method || setStoreLocation() || !StoreFunc || This method is 
called by Pig to communicate the store location to the storer. The storer 
should use this method to communicate the same information to the underlying 
!OutputFormat. This method is called multiple times by pig - implementations 
should bear in mind that this method is called multiple times and should ensure 
there are no inconsistent side effects due to the multiple calls.||
- || getStorePreparationClass() || getOutputFormat() || In the old API, 
getStorePreparationClass() was the means by which the implementation could 
communicate 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 
called 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 implementation could 
communicate 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 
called by pig in the same manner (and in the same context) as by Hadoop in a 
map-reduce java program.||
  || bindTo() || prepareToWrite() || !StoreFunc || bindTo() was the old method 
which would provide an !OutputStream among other things to the !StoreFunc. 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() wherein the 
!RecordWriter associated with the !OutputFormat provided by the !StoreFunc 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 not 
changed and is called by Pig runtime to write the next tuple of data - in the 
new API, this is the method wherein the implementation will use the the 
underlying !RecordWriter to write the Tuple out ||
  || finish() || no equivalent method in !StoreFunc - implementations can use 
close() in !RecordWriter or commitTask in !OutputCommitter || !RecordWriter or 
!OutputCommitter || finish() has been removed from !StoreFunc since the same 
semantics can be achieved by !RecordWriter.close() or 
!OutputCommitter.commitTask() - in the latter case 
!OutputCommitter.needsTaskCommit() should return true.||

Reply via email to