@InputRequirement(value=INPUT_REQUIRED) @Tags(value={"put","ORC","hadoop","HDFS","filesystem","restricted","record"}) @CapabilityDescription(value="Reads records from an incoming FlowFile using the provided Record Reader, and writes those records to a ORC file in the location/filesystem specified in the configuration.") @ReadsAttribute(attribute="filename", description="The name of the file to write comes from the value of this attribute.") @WritesAttribute(attribute="filename",description="The name of the file is stored in this attribute.") @WritesAttribute(attribute="absolute.hdfs.path",description="The absolute path to the file is stored in this attribute.") @WritesAttribute(attribute="record.count",description="The number of records written to the ORC file") @WritesAttribute(attribute="hive.ddl",description="Creates a partial Hive DDL statement for creating an external table in Hive from the destination folder. This can be used in ReplaceText for setting the content to the DDL. To make it valid DDL, add \"LOCATION \'<path_to_orc_file_in_hdfs>\'\", where the path is the directory that contains this ORC file on HDFS. For example, this processor can send flow files downstream to ReplaceText to set the content to this DDL (plus the LOCATION clause as described), then to PutHiveQL processor to create the table if it doesn\'t exist.") @Restricted(restrictions=@Restriction(requiredPermission=WRITE_FILESYSTEM,explanation="Provides operator the ability to write to any file that NiFi has access to in HDFS or the local filesystem.")) public class PutORC extends AbstractPutHDFSRecord
AbstractHadoopProcessor.HdfsResources, AbstractHadoopProcessor.ValidationResources
Modifier and Type | Field and Description |
---|---|
static PropertyDescriptor |
BUFFER_SIZE |
static List<AllowableValue> |
COMPRESSION_TYPES |
static String |
HIVE_DDL_ATTRIBUTE |
(package private) static PropertyDescriptor |
HIVE_FIELD_NAMES |
(package private) static PropertyDescriptor |
HIVE_TABLE_NAME |
static PropertyDescriptor |
ORC_CONFIGURATION_RESOURCES |
static PropertyDescriptor |
STRIPE_SIZE |
COMPRESSION_TYPE, OVERWRITE, RECORD_COUNT_ATTR, RECORD_READER, REL_FAILURE, REL_RETRY, REL_SUCCESS, REMOTE_GROUP, REMOTE_OWNER, UMASK
ABSOLUTE_HDFS_PATH_ATTRIBUTE, ADDITIONAL_CLASSPATH_RESOURCES, COMPRESSION_CODEC, DIRECTORY, HADOOP_CONFIGURATION_RESOURCES, KERBEROS_RELOGIN_PERIOD, kerberosProperties, properties
Constructor and Description |
---|
PutORC() |
Modifier and Type | Method and Description |
---|---|
HDFSRecordWriter |
createHDFSRecordWriter(ProcessContext context,
FlowFile flowFile,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path,
RecordSchema schema) |
List<PropertyDescriptor> |
getAdditionalProperties() |
List<AllowableValue> |
getCompressionTypes(ProcessorInitializationContext context) |
String |
getDefaultCompressionType(ProcessorInitializationContext context) |
changeOwner, createDirectory, deleteQuietly, getRelationships, getSupportedPropertyDescriptors, init, onScheduled, onTrigger, postProcess, preProcessConfiguration, rename
abstractOnScheduled, abstractOnStopped, checkHdfsUriForTimeout, customValidate, getCompressionCodec, getConfiguration, getFileSystem, getFileSystem, getFileSystemAsUser, getKerberosProperties, getPathDifference, getUserGroupInformation
onTrigger
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
public static final String HIVE_DDL_ATTRIBUTE
public static final PropertyDescriptor ORC_CONFIGURATION_RESOURCES
public static final PropertyDescriptor STRIPE_SIZE
public static final PropertyDescriptor BUFFER_SIZE
static final PropertyDescriptor HIVE_TABLE_NAME
static final PropertyDescriptor HIVE_FIELD_NAMES
public static final List<AllowableValue> COMPRESSION_TYPES
public List<AllowableValue> getCompressionTypes(ProcessorInitializationContext context)
getCompressionTypes
in class AbstractPutHDFSRecord
public String getDefaultCompressionType(ProcessorInitializationContext context)
getDefaultCompressionType
in class AbstractPutHDFSRecord
public List<PropertyDescriptor> getAdditionalProperties()
getAdditionalProperties
in class AbstractPutHDFSRecord
public HDFSRecordWriter createHDFSRecordWriter(ProcessContext context, FlowFile flowFile, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path, RecordSchema schema) throws IOException, SchemaNotFoundException
createHDFSRecordWriter
in class AbstractPutHDFSRecord
IOException
SchemaNotFoundException
Copyright © 2020 Apache NiFi Project. All rights reserved.