Class CompositeHandler

    • Constructor Detail

      • CompositeHandler

        public CompositeHandler​(MetadataHandler metadataHandler,
                                RecordHandler recordHandler)
        Basic constructor that composes a MetadataHandler with a RecordHandler.
        Parameters:
        metadataHandler - The MetadataHandler to delegate metadata operations to.
        recordHandler - The RecordHandler to delegate data operations to.
      • CompositeHandler

        public CompositeHandler​(MetadataHandler metadataHandler,
                                RecordHandler recordHandler,
                                UserDefinedFunctionHandler udfhandler)
        Basic constructor that composes a MetadataHandler, RecordHandler, and a UserDefinedFunctionHandler
        Parameters:
        metadataHandler - The MetadataHandler to delegate metadata operations to.
        recordHandler - The RecordHandler to delegate data operations to.
        udfhandler - The UserDefinedFunctionHandler to delegate UDF operations to.
    • Method Detail

      • handleRequest

        public final void handleRequest​(InputStream inputStream,
                                        OutputStream outputStream,
                                        com.amazonaws.services.lambda.runtime.Context context)
                                 throws IOException
        Required by Lambda's RequestStreamHandler interface. In our case we use this method to handle some basic resource lifecycle tasks for the request, namely the BlockAllocator and the request object itself.
        Specified by:
        handleRequest in interface com.amazonaws.services.lambda.runtime.RequestStreamHandler
        Throws:
        IOException
      • handleRequest

        public final void handleRequest​(BlockAllocator allocator,
                                        FederationRequest rawReq,
                                        OutputStream outputStream,
                                        com.fasterxml.jackson.databind.ObjectMapper objectMapper)
                                 throws Exception
        Handles routing the request to the appropriate Handler, either MetadataHandler or RecordHandler.
        Parameters:
        allocator - The BlockAllocator to use for Apache Arrow Resources.
        rawReq - The request object itself.
        outputStream - The OutputStream to which all responses should be written.
        objectMapper - The ObjectMapper that can be used for serializing responses.
        Throws:
        Exception