Package org.netbeans.gradle.model.internal

Examples of org.netbeans.gradle.model.internal.CustomSerializedMap$Deserializer


    JobConf jobConf = new JobConf(owi.getParseContext().getConf());
    Utilities.setColumnNameList(jobConf, tableScanOp);
    Utilities.copyTableJobPropertiesToConf(
      Utilities.getTableDesc(tbl),
      jobConf);
    Deserializer deserializer = tbl.getDeserializer();
    HiveStoragePredicateHandler.DecomposedPredicate decomposed =
      predicateHandler.decomposePredicate(
        jobConf,
        deserializer,
        originalPredicate);
View Full Code Here


  public ArrayList<StructField> getFields() {

    ArrayList<StructField> fields = new ArrayList<StructField>();
    try {
      Deserializer decoder = getDeserializer();

      // Expand out all the columns of the table
      StructObjectInspector structObjectInspector = (StructObjectInspector) decoder
          .getObjectInspector();
      List<? extends StructField> fld_lst = structObjectInspector
          .getAllStructFieldRefs();
      for (StructField field : fld_lst) {
        fields.add(field);
View Full Code Here

  public Vector<StructField> getFields() {

    Vector<StructField> fields = new Vector<StructField> ();
    try {
      Deserializer decoder = getDeserializer();

      // Expand out all the columns of the table
      StructObjectInspector structObjectInspector = (StructObjectInspector)decoder.getObjectInspector();
      List<? extends StructField> fld_lst = structObjectInspector.getAllStructFieldRefs();
      for(StructField field: fld_lst) {
        fields.add(field);
      }
    } catch (SerDeException e) {
View Full Code Here

  /**
   * Check if the given serde is valid.
   */
  private void validateSerDe(String serdeName) throws HiveException {
    try {
      Deserializer d = SerDeUtils.lookupDeserializer(serdeName);
      if (d != null) {
        LOG.debug("Found class for " + serdeName);
      }
    } catch (SerDeException e) {
      throw new HiveException("Cannot validate serde: " + serdeName, e);
View Full Code Here

    String tableName = String.valueOf(tblProps.getProperty("name"));
    String partName = String.valueOf(partSpec);
    // HiveConf.setVar(hconf, HiveConf.ConfVars.HIVETABLENAME, tableName);
    // HiveConf.setVar(hconf, HiveConf.ConfVars.HIVEPARTITIONNAME, partName);
    Deserializer deserializer = (Deserializer) sdclass.newInstance();
    deserializer.initialize(hconf, tblProps);
    StructObjectInspector rawRowObjectInspector = (StructObjectInspector) deserializer
        .getObjectInspector();

    MapOpCtx opCtx = null;
    // Next check if this table has partitions and if so
    // get the list of partition names as well as allocate
View Full Code Here

      final TableDesc tblDesc) throws HiveException {
    tableDesc = tblDesc;
    properties = part.getSchemaFromTableSchema(tblDesc.getProperties()); // each partition maintains a large properties
    partSpec = part.getSpec();
    // deserializerClass = part.getDeserializer(properties).getClass();
    Deserializer deserializer;
    try {
      deserializer = SerDeUtils.lookupDeserializer(
          properties.getProperty(org.apache.hadoop.hive.serde.Constants.SERIALIZATION_LIB));
    } catch (SerDeException e) {
      throw new HiveException(e);
    }
    deserializerClass = deserializer.getClass();
    inputFileFormatClass = part.getInputFormatClass();
    outputFileFormatClass = part.getOutputFormatClass();
    serdeClassName = properties.getProperty(
        org.apache.hadoop.hive.serde.Constants.SERIALIZATION_LIB);
  }
View Full Code Here

  /**
   * Return a deserializer object corresponding to the tableDesc.
   */
  public Deserializer getDeserializer() throws Exception {
    Deserializer de = deserializerClass.newInstance();
    de.initialize(null, properties);
    return de;
  }
View Full Code Here

            tbl.getSd().getSerdeInfo().getSerializationLib());
        if (!getColsFromSerDe) {
          ret = tbl.getSd().getCols();
        } else {
          try {
            Deserializer s = MetaStoreUtils.getDeserializer(hiveConf, tbl);
            ret = MetaStoreUtils.getFieldsFromDeserializer(tableName, s);
          } catch (SerDeException e) {
            StringUtils.stringifyException(e);
            throw new MetaException(e.getMessage());
          }
View Full Code Here

                index++;
            }
        }

        Map<Object, Throwable> serializationIssues = new HashMap<Object, Throwable>();
        CustomSerializedMap serializedBuilders = builders.create(serializationIssues);

        return new GradleInfoQueryMap(
                serializedBuilders,
                classpath,
                serializationIssues);
View Full Code Here

            AllProjectInfoBuilder builder = new AllProjectInfoBuilder(modelClasses, evaluatedBuild);

            Map<String, ActionFetchedProjectModels> fetchedModels = builder.buildProjectModels(controller);
            ActionFetchedProjectModels defaultModels = fetchedModels.remove(builder.getDefaultProjectPath());

            CustomSerializedMap buildModels = getBuildInfoResults(controller);
            return new ActionFetchedModels(buildModels, defaultModels, fetchedModels.values());
        }
View Full Code Here

TOP

Related Classes of org.netbeans.gradle.model.internal.CustomSerializedMap$Deserializer

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.