congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
HiveSerDeWrapper.getOutputFormatClassName
Code IndexAdd Tabnine to your IDE (free)

How to use
getOutputFormatClassName
method
in
org.apache.gobblin.hive.HiveSerDeWrapper

Best Java code snippets using org.apache.gobblin.hive.HiveSerDeWrapper.getOutputFormatClassName (Showing top 4 results out of 315)

origin: apache/incubator-gobblin

@SuppressWarnings("deprecation")
@Override
public DataWriter<Writable> build() throws IOException {
 Preconditions.checkNotNull(this.destination);
 Preconditions.checkArgument(!Strings.isNullOrEmpty(this.writerId));
 State properties = this.destination.getProperties();
 if (!properties.contains(WRITER_WRITABLE_CLASS) || !properties.contains(WRITER_OUTPUT_FORMAT_CLASS)) {
  HiveSerDeWrapper serializer = HiveSerDeWrapper.getSerializer(properties);
  properties.setProp(WRITER_WRITABLE_CLASS, serializer.getSerDe().getSerializedClass().getName());
  properties.setProp(WRITER_OUTPUT_FORMAT_CLASS, serializer.getOutputFormatClassName());
 }
 return new HiveWritableHdfsDataWriter(this, properties);
}
origin: apache/incubator-gobblin

/**
 * Add an Avro {@link Schema} to the given {@link HiveRegistrationUnit}.
 *
 *  <p>
 *    If {@link #USE_SCHEMA_FILE} is true, the schema will be added via {@link #SCHEMA_URL} pointing to
 *    the schema file named {@link #SCHEMA_FILE_NAME}.
 *  </p>
 *
 *  <p>
 *    If {@link #USE_SCHEMA_FILE} is false, the schema will be obtained by {@link #getDirectorySchema(Path)}.
 *    If the length of the schema is less than {@link #SCHEMA_LITERAL_LENGTH_LIMIT}, it will be added via
 *    {@link #SCHEMA_LITERAL}. Otherwise, the schema will be written to {@link #SCHEMA_FILE_NAME} and added
 *    via {@link #SCHEMA_URL}.
 *  </p>
 */
@Override
public void addSerDeProperties(Path path, HiveRegistrationUnit hiveUnit) throws IOException {
 Preconditions.checkArgument(this.fs.getFileStatus(path).isDirectory(), path + " is not a directory.");
 Schema schema;
 try (Timer.Context context = metricContext.timer(HIVE_SPEC_SCHEMA_READING_TIMER).time()) {
  schema = getDirectorySchema(path);
 }
 if (schema == null) {
  return;
 }
 hiveUnit.setSerDeType(this.serDeWrapper.getSerDe().getClass().getName());
 hiveUnit.setInputFormat(this.serDeWrapper.getInputFormatClassName());
 hiveUnit.setOutputFormat(this.serDeWrapper.getOutputFormatClassName());
 addSchemaProperties(path, hiveUnit, schema);
}
origin: org.apache.gobblin/gobblin-core

@SuppressWarnings("deprecation")
@Override
public DataWriter<Writable> build() throws IOException {
 Preconditions.checkNotNull(this.destination);
 Preconditions.checkArgument(!Strings.isNullOrEmpty(this.writerId));
 State properties = this.destination.getProperties();
 if (!properties.contains(WRITER_WRITABLE_CLASS) || !properties.contains(WRITER_OUTPUT_FORMAT_CLASS)) {
  HiveSerDeWrapper serializer = HiveSerDeWrapper.getSerializer(properties);
  properties.setProp(WRITER_WRITABLE_CLASS, serializer.getSerDe().getSerializedClass().getName());
  properties.setProp(WRITER_OUTPUT_FORMAT_CLASS, serializer.getOutputFormatClassName());
 }
 return new HiveWritableHdfsDataWriter(this, properties);
}
origin: org.apache.gobblin/gobblin-hive-registration

/**
 * Add an Avro {@link Schema} to the given {@link HiveRegistrationUnit}.
 *
 *  <p>
 *    If {@link #USE_SCHEMA_FILE} is true, the schema will be added via {@link #SCHEMA_URL} pointing to
 *    the schema file named {@link #SCHEMA_FILE_NAME}.
 *  </p>
 *
 *  <p>
 *    If {@link #USE_SCHEMA_FILE} is false, the schema will be obtained by {@link #getDirectorySchema(Path)}.
 *    If the length of the schema is less than {@link #SCHEMA_LITERAL_LENGTH_LIMIT}, it will be added via
 *    {@link #SCHEMA_LITERAL}. Otherwise, the schema will be written to {@link #SCHEMA_FILE_NAME} and added
 *    via {@link #SCHEMA_URL}.
 *  </p>
 */
@Override
public void addSerDeProperties(Path path, HiveRegistrationUnit hiveUnit) throws IOException {
 Preconditions.checkArgument(this.fs.getFileStatus(path).isDirectory(), path + " is not a directory.");
 Schema schema;
 try (Timer.Context context = metricContext.timer(HIVE_SPEC_SCHEMA_READING_TIMER).time()) {
  schema = getDirectorySchema(path);
 }
 if (schema == null) {
  return;
 }
 hiveUnit.setSerDeType(this.serDeWrapper.getSerDe().getClass().getName());
 hiveUnit.setInputFormat(this.serDeWrapper.getInputFormatClassName());
 hiveUnit.setOutputFormat(this.serDeWrapper.getOutputFormatClassName());
 addSchemaProperties(path, hiveUnit, schema);
}
org.apache.gobblin.hiveHiveSerDeWrappergetOutputFormatClassName

Javadoc

Get the output format class name associated with this HiveSerDeWrapper.

Popular methods of HiveSerDeWrapper

  • getInputFormatClassName
    Get the input format class name associated with this HiveSerDeWrapper.
  • getSerDe
    Get the SerDe instance associated with this HiveSerDeWrapper. This method performs lazy initializati
  • <init>
  • get
    Get an instance of HiveSerDeWrapper.
  • getDeserializer
    Get an instance of HiveSerDeWrapper from a State.
  • getSerializer
    Get an instance of HiveSerDeWrapper from a State.

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now