ashoksri0 opened a new issue #3359:
URL: https://github.com/apache/iceberg/issues/3359
I'm using iceberg java core APi to ingest records into hdfs with below code
`public class SampleIngestion_test {
private static final Logger logger =
LogManager.getLogger(SampleIngestion_test.class);
public static void main(String[] args) throws IOException {
final Configuration configuration = new Configuration();
configuration.set("spark.sql.catalog.spark_catalog","org.apache.iceberg.spark.SparkSessionCatalog");
configuration.set("spark.sql.catalog.spark_catalog.type","hive");
configuration.set("spark.sql.catalog.spark_catalog.warehouse","hdfs://localhost:54310/test");
configuration.set("spark.sql.warehouse.dir","hdfs://localhost:54310/test");
configuration.set("hive.metastore.warehouse.dir","hdfs://localhost:54310/test");
configuration.set("hive.metastore.uris", "thrift://localhost:9083");
HiveCatalog hiveCatalog = new HiveCatalog();
hiveCatalog.setConf(configuration);
Map<String, String> properties =new HashMap<>();
hiveCatalog.initialize("hive",properties);
final Table table =
hiveCatalog.loadTable(TableIdentifier.of(Namespace.of("claims_sys"),
"SUBSCRIBER"));
System.out.println(table.location());
PartitionSpec partitionSpec = PartitionSpec
.builderFor(table.schema())
.build();
final InputFile inputFile =
Files.localInput("/home/ash/data/claim_sys/parquet(copy)" +
"/SUBSCRIBER/part-00000-ca14f1f2-2567-4bb6-a681-0c9944afabcd" +
"-c000" +
".snappy.parquet");
final DataFile dataFile = DataFiles.builder(partitionSpec)
.withFormat(FileFormat.PARQUET)
.withInputFile(inputFile)
.withFileSizeInBytes(inputFile.getLength())
.withRecordCount(10000)
.build();
table.newAppend().appendFile(dataFile).apply();
table.newAppend().appendFile(dataFile).commit();
}
}`
`
here I'm getting a metadata file and a snapshot file but the manifest file
is created but it's empty doesn't consist of the data file and snapshot id as a
record
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]