Skip to content

Commit

Permalink
use HiveTablePropertiesMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
FANNG1 committed Mar 26, 2024
1 parent 297e4a4 commit 08425ff
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public class HiveTablePropertiesMetadata extends BasePropertiesMetadata {
@VisibleForTesting
public static final String ORC_SERDE_CLASS = "org.apache.hadoop.hive.ql.io.orc.OrcSerde";

private static final String PARQUET_INPUT_FORMAT_CLASS =
public static final String PARQUET_INPUT_FORMAT_CLASS =
"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat";
private static final String PARQUET_OUTPUT_FORMAT_CLASS =
public static final String PARQUET_OUTPUT_FORMAT_CLASS =
"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat";
private static final String PARQUET_SERDE_CLASS =
public static final String PARQUET_SERDE_CLASS =
"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe";
private static final String COLUMNAR_SERDE_CLASS =
"org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe";
Expand Down
1 change: 1 addition & 0 deletions spark-connector/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ val scalaJava8CompatVersion: String = libs.versions.scala.java.compat.get()

dependencies {
implementation(project(":api"))
implementation(project(":catalogs:bundled-catalog", configuration = "shadow"))
implementation(project(":clients:client-java-runtime", configuration = "shadow"))
implementation(project(":common"))
implementation(libs.bundles.log4j)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,34 @@

package com.datastrato.gravitino.spark.connector.hive;

import com.datastrato.gravitino.catalog.hive.HiveTablePropertiesMetadata;

public class HivePropertyConstants {
public static final String GRAVITINO_HIVE_FORMAT = "format";
public static final String GRAVITINO_HIVE_INPUT_FORMAT = "input-format";
public static final String GRAVITINO_HIVE_OUTPUT_FORMAT = "output-format";
public static final String GRAVITINO_HIVE_SERDE_LIB = "serde-lib";
public static final String GRAVITINO_HIVE_SERDE_PARAMETER_PREFIX = "serde.parameter.";
public static final String GRAVITINO_HIVE_FORMAT = HiveTablePropertiesMetadata.FORMAT;
public static final String GRAVITINO_HIVE_INPUT_FORMAT = HiveTablePropertiesMetadata.INPUT_FORMAT;
public static final String GRAVITINO_HIVE_OUTPUT_FORMAT =
HiveTablePropertiesMetadata.OUTPUT_FORMAT;
public static final String GRAVITINO_HIVE_SERDE_LIB = HiveTablePropertiesMetadata.SERDE_LIB;
public static final String GRAVITINO_HIVE_SERDE_PARAMETER_PREFIX =
HiveTablePropertiesMetadata.SERDE_PARAMETER_PREFIX;

public static final String SPARK_HIVE_STORED_AS = "hive.stored-as";
public static final String SPARK_HIVE_INPUT_FORMAT = "input-format";
public static final String SPARK_HIVE_OUTPUT_FORMAT = "output-format";
public static final String SPARK_HIVE_SERDE_LIB = "serde-lib";

public static final String TEXT_INPUT_FORMAT_CLASS = "org.apache.hadoop.mapred.TextInputFormat";
public static final String TEXT_INPUT_FORMAT_CLASS =
HiveTablePropertiesMetadata.TEXT_INPUT_FORMAT_CLASS;
public static final String IGNORE_KEY_OUTPUT_FORMAT_CLASS =
"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat";
HiveTablePropertiesMetadata.IGNORE_KEY_OUTPUT_FORMAT_CLASS;
public static final String LAZY_SIMPLE_SERDE_CLASS =
"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe";
HiveTablePropertiesMetadata.LAZY_SIMPLE_SERDE_CLASS;

public static final String PARQUET_INPUT_FORMAT_CLASS =
"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat";
HiveTablePropertiesMetadata.PARQUET_INPUT_FORMAT_CLASS;
public static final String PARQUET_OUTPUT_FORMAT_CLASS =
"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat";
public static final String PARQUET_SERDE_CLASS =
"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe";
HiveTablePropertiesMetadata.PARQUET_OUTPUT_FORMAT_CLASS;
public static final String PARQUET_SERDE_CLASS = HiveTablePropertiesMetadata.PARQUET_SERDE_CLASS;

private HivePropertyConstants() {}
}

0 comments on commit 08425ff

Please sign in to comment.