Class SprayDirectoryToThor

  • All Implemented Interfaces:
    AdaptrisComponent, AdaptrisMessageProducer, AdaptrisMessageSender, AdaptrisMessageWorker, ComponentLifecycle, ComponentLifecycleExtension, MessageEventGenerator

    @ComponentProfile(summary="Spray a directory into HPCC via dfuplus",
                      tag="producer,hpcc,dfuplus",
                      recommended=DfuplusConnection.class)
    public class SprayDirectoryToThor
    extends SprayToThorImpl
    Spray the contents of a directory to Thor.

    Note that this producer ignores the current message contents and just sprays the contents of the directory specified by #getSourceDirectoryKey() using the configured dfuplus command.

    Effectively, the program executed is going to similar to

     
          dfuplus action=spray srcfile=/path/to/dir/*
            dstcluster=mythor dstname=~zzlc:json:data overwrite=1 PREFIX=FILENAME,FILESIZE
            server= nosplit=1 username= password=
       
     
    Be aware that nosplit=1 is always added, as well as the "/*".

    The adapter also needs a running dfuplus action=dafilesrv instance on the machine where the adapter is hosted. Thor will connect to this instance for file delivery.

    In the adapter configuration file this class is aliased as spray-directory-to-thor which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • SprayDirectoryToThor

        public SprayDirectoryToThor()
    • Method Detail

      • getPrefix

        public java.lang.String getPrefix()
        Optional prefix.
      • setPrefix

        public void setPrefix​(java.lang.String prefix)
        Optional prefix.
      • getSourceDirectory

        public java.lang.String getSourceDirectory()
        The source directory to spray into Thor.
      • setSourceDirectory

        public void setSourceDirectory​(java.lang.String sourceDirectory)
        The source directory to spray into Thor.
      • getDeleteSourceDirectory

        public java.lang.Boolean getDeleteSourceDirectory()
        Specify true to delete the source directory after successfully spray into HPCC.

        The default is false if not explicitly specified

      • setDeleteSourceDirectory

        public void setDeleteSourceDirectory​(java.lang.Boolean deleteSourceDirectory)
        Specify true to delete the source directory after successfully spray into HPCC.

        The default is false if not explicitly specified