-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] Hive Source/Sink support multiple table (#5929)
- Loading branch information
1 parent
7b4e072
commit 4d9287f
Showing
30 changed files
with
1,612 additions
and
468 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
.../src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/config/BaseHiveOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.seatunnel.connectors.seatunnel.hive.config; | ||
|
||
import org.apache.seatunnel.api.configuration.Option; | ||
import org.apache.seatunnel.api.configuration.Options; | ||
import org.apache.seatunnel.connectors.seatunnel.file.config.BaseSourceConfigOptions; | ||
|
||
public class BaseHiveOptions extends BaseSourceConfigOptions { | ||
|
||
public static final Option<String> TABLE_NAME = | ||
Options.key("table_name") | ||
.stringType() | ||
.noDefaultValue() | ||
.withDescription("Hive table name"); | ||
|
||
public static final Option<String> METASTORE_URI = | ||
Options.key("metastore_uri") | ||
.stringType() | ||
.noDefaultValue() | ||
.withDescription("Hive metastore uri"); | ||
|
||
public static final Option<String> HIVE_SITE_PATH = | ||
Options.key("hive_site_path") | ||
.stringType() | ||
.noDefaultValue() | ||
.withDescription("The path of hive-site.xml"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...ve/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/config/HiveConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.seatunnel.connectors.seatunnel.hive.config; | ||
|
||
public class HiveConstants { | ||
|
||
public static final String CONNECTOR_NAME = "Hive"; | ||
|
||
public static final String TEXT_INPUT_FORMAT_CLASSNAME = | ||
"org.apache.hadoop.mapred.TextInputFormat"; | ||
public static final String TEXT_OUTPUT_FORMAT_CLASSNAME = | ||
"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat"; | ||
public static final String PARQUET_INPUT_FORMAT_CLASSNAME = | ||
"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat"; | ||
public static final String PARQUET_OUTPUT_FORMAT_CLASSNAME = | ||
"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat"; | ||
public static final String ORC_INPUT_FORMAT_CLASSNAME = | ||
"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"; | ||
public static final String ORC_OUTPUT_FORMAT_CLASSNAME = | ||
"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.