Package org.apache.hive.hcatalog.common

Examples of org.apache.hive.hcatalog.common.HCatException


    try {
      return new TSerializer(new TJSONProtocol.Factory())
          .toString(hcatTable.toHiveTable(), "UTF-8");
    }
    catch (TException exception) {
      throw new HCatException("Could not serialize HCatTable: " + hcatTable, exception);
    }
  }
View Full Code Here


      return new HCatTable(table);
    }
    catch(TException exception) {
      if (LOG.isDebugEnabled())
        LOG.debug("Could not de-serialize from: " + hcatTableStringRep);
      throw new HCatException("Could not de-serialize HCatTable.", exception);
    }
  }
View Full Code Here

    try {
      return new TSerializer(new TJSONProtocol.Factory())
          .toString(hcatPartition.toHivePartition(), "UTF-8");
    }
    catch (TException exception) {
      throw new HCatException("Could not serialize HCatPartition: " + hcatPartition, exception);
    }
  }
View Full Code Here

      return new HCatPartition(null, partition);
    }
    catch(TException exception) {
      if (LOG.isDebugEnabled())
        LOG.debug("Could not de-serialize partition from: " + hcatPartitionStringRep);
      throw new HCatException("Could not de-serialize HCatPartition.", exception);
    }
  }
View Full Code Here

        stringReps.add(serializer.toString(partitionSpec, "UTF-8"));
      }
      return stringReps;
    }
    catch (TException serializationException) {
      throw new HCatException("Failed to serialize!", serializationException);
    }
  }
View Full Code Here

        partitionSpecList.add(partSpec);
      }
      return new HCatPartitionSpec(null, PartitionSpecProxy.Factory.get(partitionSpecList));
    }
    catch (TException deserializationException) {
      throw new HCatException("Failed to deserialize!", deserializationException);
    }
  }
View Full Code Here

    }

    // If partition columns occur in data, we want to remove them.
    partColsToDel = jobInfo.getPosOfPartCols();
    if (partColsToDel == null) {
      throw new HCatException("It seems that setSchema() is not called on "
          + "HCatOutputFormat. Please make sure that method is called.");
    }
  }
View Full Code Here

      TaskAttemptContext context) throws IOException, InterruptedException {
    super(baseWriter, context);
    maxDynamicPartitions = jobInfo.getMaxDynamicPartitions();
    dynamicPartCols = jobInfo.getPosOfDynPartCols();
    if (dynamicPartCols == null) {
      throw new HCatException("It seems that setSchema() is not called on "
          + "HCatOutputFormat. Please make sure that method is called.");
    }

    this.baseDynamicSerDe = new HashMap<String, SerDe>();
    this.baseDynamicWriters =
View Full Code Here

    }

    String dynKey = dynamicPartValues.toString();
    if (!baseDynamicWriters.containsKey(dynKey)) {
      if ((maxDynamicPartitions != -1) && (baseDynamicWriters.size() > maxDynamicPartitions)) {
        throw new HCatException(ErrorType.ERROR_TOO_MANY_DYNAMIC_PTNS,
            "Number of dynamic partitions being created "
                + "exceeds configured max allowable partitions[" + maxDynamicPartitions
                + "], increase parameter [" + HiveConf.ConfVars.DYNAMICPARTITIONMAXPARTS.varname
                + "] if needed.");
      }
View Full Code Here

   * @throws IOException the IO exception
   */
  public static OutputJobInfo getJobInfo(Configuration conf) throws IOException {
    String jobString = conf.get(HCatConstants.HCAT_KEY_OUTPUT_INFO);
    if (jobString == null) {
      throw new HCatException(ErrorType.ERROR_NOT_INITIALIZED);
    }

    return (OutputJobInfo) HCatUtil.deserialize(jobString);
  }
View Full Code Here

TOP

Related Classes of org.apache.hive.hcatalog.common.HCatException

Copyright © 2018 www.massapicom. 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.