You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/10/23 14:37:28 UTC

[GitHub] [iceberg] ashoksri0 opened a new issue #3359: Manifest file is empty

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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ashoksri0 commented on issue #3359: Manifest file is empty

Posted by GitBox <gi...@apache.org>.
ashoksri0 commented on issue #3359:
URL: https://github.com/apache/iceberg/issues/3359#issuecomment-950332598


   worngly created now everthing working fine 


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] ashoksri0 closed issue #3359: Manifest file is empty

Posted by GitBox <gi...@apache.org>.
ashoksri0 closed issue #3359:
URL: https://github.com/apache/iceberg/issues/3359


   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org