return 1;
}
return 0;
}
showPartitionsDesc showParts = work.getShowPartsDesc();
if (showParts != null) {
// get the partitions for the table and populate the output
String tabName = showParts.getTabName();
Table tbl = null;
List<String> parts = null;
tbl = db.getTable(tabName);
if (!tbl.isPartitioned()) {
console.printError("Table " + tabName + " is not a partitioned table");
return 1;
}
parts = db.getPartitionNames(MetaStoreUtils.DEFAULT_DATABASE_NAME, tbl.getName(), Short.MAX_VALUE);
// write the results in the file
try {
DataOutput outStream = (DataOutput)fs.create(showParts.getResFile());
Iterator<String> iterParts = parts.iterator();
boolean firstCol = true;
while (iterParts.hasNext())
{
if (!firstCol)