Class VespaDocumentOperation


  • public class VespaDocumentOperation
    extends org.apache.pig.EvalFunc<String>
    A Pig UDF to convert simple Pig types into a valid Vespa JSON document format.
    Author:
    lesters
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  VespaDocumentOperation.Operation  
      • Nested classes/interfaces inherited from class org.apache.pig.EvalFunc

        org.apache.pig.EvalFunc.SchemaType
    • Field Summary

      • Fields inherited from class org.apache.pig.EvalFunc

        log, pigLogger, reporter, returnType
    • Constructor Detail

      • VespaDocumentOperation

        public VespaDocumentOperation​(String... params)
    • Method Detail

      • create

        public static String create​(VespaDocumentOperation.Operation op,
                                    String docId,
                                    Map<String,​Object> fields,
                                    Properties properties,
                                    org.apache.pig.impl.logicalLayer.schema.Schema schema)
                             throws IOException
        Create a JSON Vespa document operation given the supplied fields, operation and document id template.
        Parameters:
        op - Operation (put, remove, update)
        docId - Document id
        fields - Fields to put in document operation
        Returns:
        A valid JSON Vespa document operation
        Throws:
        IOException - ...