Class DumpCommand.TupleExporter

  • All Implemented Interfaces:
    TupleProcessor
    Enclosing class:
    DumpCommand

    protected static class DumpCommand.TupleExporter
    extends java.lang.Object
    implements TupleProcessor
    A tuple processor implementation used to dump each tuple.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.PrintStream dumpOut  
    • Constructor Summary

      Constructors 
      Constructor Description
      TupleExporter​(java.io.PrintStream dumpOut)
      Initialize the tuple-exporter object with the details it needs to print out tuples from the specified table.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void finish()
      This function is called when all tuples have been produced and passed to the tuple processor.
      void process​(Tuple tuple)
      This implementation simply prints out each tuple it is handed.
      void setSchema​(Schema schema)
      The exporter can output the schema to the dump file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • dumpOut

        private java.io.PrintStream dumpOut
    • Constructor Detail

      • TupleExporter

        public TupleExporter​(java.io.PrintStream dumpOut)
        Initialize the tuple-exporter object with the details it needs to print out tuples from the specified table.
    • Method Detail

      • setSchema

        public void setSchema​(Schema schema)
        The exporter can output the schema to the dump file.
        Specified by:
        setSchema in interface TupleProcessor
      • process

        public void process​(Tuple tuple)
        This implementation simply prints out each tuple it is handed.
        Specified by:
        process in interface TupleProcessor
        Parameters:
        tuple - The tuple to process.
      • finish

        public void finish()
        Description copied from interface: TupleProcessor
        This function is called when all tuples have been produced and passed to the tuple processor.
        Specified by:
        finish in interface TupleProcessor