1
0

[HUDI-4098] Support HMS for flink HudiCatalog (#6082)

* [HUDI-4098]Support HMS for flink HudiCatalog
This commit is contained in:
Bo Cui
2022-07-18 11:46:23 +08:00
committed by GitHub
parent 3964c476e0
commit 9282611bae
19 changed files with 2098 additions and 11 deletions

View File

@@ -23,6 +23,7 @@ import org.apache.avro.Schema;
import org.apache.avro.Schema.Field;
import org.apache.avro.SchemaCompatibility;
import org.apache.avro.generic.IndexedRecord;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
@@ -261,6 +262,11 @@ public class TableSchemaResolver {
}
}
public static MessageType convertAvroSchemaToParquet(Schema schema, Configuration hadoopConf) {
AvroSchemaConverter avroSchemaConverter = new AvroSchemaConverter(hadoopConf);
return avroSchemaConverter.convert(schema);
}
private Schema convertParquetSchemaToAvro(MessageType parquetSchema) {
AvroSchemaConverter avroSchemaConverter = new AvroSchemaConverter(metaClient.getHadoopConf());
return avroSchemaConverter.convert(parquetSchema);

View File

@@ -0,0 +1,42 @@
/*
* 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.hudi.exception;
/**
* Exception thrown for Hoodie Catalog errors.
*/
public class HoodieCatalogException extends RuntimeException {
public HoodieCatalogException() {
super();
}
public HoodieCatalogException(String message) {
super(message);
}
public HoodieCatalogException(String message, Throwable t) {
super(message, t);
}
public HoodieCatalogException(Throwable t) {
super(t);
}
}