Examples of listPartitions()


Examples of org.apache.hadoop.hive.metastore.HiveMetaStoreClient.listPartitions()

     
      List<Map<String, String>> partitions = new ArrayList<Map<String, String>>();
      partitions.add(part1);
     
      // no partitions yet
      List<Partition> parts = client.listPartitions(dbName, tableName,
          (short) -1);
      assertTrue(parts.isEmpty());

      String partitionLocation = PART1_NAME + Path.SEPARATOR + PART2_NAME;
      // add the partitions
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.HiveMetaStoreClient.listPartitions()

        task.initialize(hiveConf);
        assertEquals(0, task.execute());
      }

      // should have one
      parts = client.listPartitions(dbName, tableName, (short) -1);
      assertEquals(1, parts.size());
      Partition insertedPart = parts.get(0);
      assertEquals(tbl.getSd().getLocation() + Path.SEPARATOR + partitionLocation,
          insertedPart.getSd().getLocation());
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.HiveMetaStoreClient.listPartitions()

      AddPartitionDesc addPartition = new AddPartitionDesc(dbName, tableName, part1, null);
      Task<DDLWork> task = TaskFactory.get(new DDLWork(addPartition), hiveConf);
      task.initialize(hiveConf);
      assertEquals(0, task.execute());
      parts = client.listPartitions(dbName, tableName, (short) -1);
      assertEquals(1, parts.size());

      // see that this fails properly
      addPartition = new AddPartitionDesc(dbName, "doesnotexist", part1, null);
      task = TaskFactory.get(new DDLWork(addPartition), hiveConf);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.