Package co.nubetech.hiho.common

Examples of co.nubetech.hiho.common.HIHOException


    }
  }

  public void checkMandatoryConfs(Configuration conf) throws HIHOException {
    if (inputPath == null) {
      throw new HIHOException(
          "The provided inputPath is empty, please specify inputPath");
    }
    if (conf.get(DBConfiguration.URL_PROPERTY) == null) {
      throw new HIHOException(
          "The JDBC URL is not specified, please specify JDBC URL");
    }
    if (conf.get(DBConfiguration.USERNAME_PROPERTY) == null) {
      throw new HIHOException(
          "The JDBC USERNAME is not specified, please specify JDBC USERNAME");
    }
    if (conf.get(DBConfiguration.PASSWORD_PROPERTY) == null) {
      throw new HIHOException(
          "The JDBC PASSWORD is not defined, please specify JDBC PASSWORD");
    }
    if (conf.get(HIHOConf.LOAD_QUERY_SUFFIX) == null) {
      throw new HIHOException(
          "The Suffix for query is not defined, please specify suffix");
    }
  }
View Full Code Here


    case Types.VARCHAR:
    case Types.LONGVARCHAR:
      returnType = "chararray";
      break;
    default:
      throw new HIHOException("Unsupported type");
    }
    return returnType;
  }
View Full Code Here

    }
  }

  public void checkMandatoryConfs() throws HIHOException {
    if (inputPath == null) {
      throw new HIHOException(
          "The provided input path is empty, please specify inputPath");
    }
  }
View Full Code Here

    }
  }

  public void checkMandatoryConfs(Configuration conf) throws HIHOException {
    if (inputPath == null) {
      throw new HIHOException(
          "The provided inputPath is empty, please specify inputPath");
    }
    if (conf.get(HIHOConf.SALESFORCE_USERNAME) == null) {
      throw new HIHOException(
          "The SalesForce UserName is not specified, please specify SalesForce UserName");
    }
    if (conf.get(HIHOConf.SALESFORCE_PASSWORD) == null) {
      throw new HIHOException(
          "The SalesForce Password is not specified, please specify SalesForce Password");
    }
    if (conf.get(HIHOConf.SALESFORCE_SOBJECTYPE) == null) {
      throw new HIHOException(
          "The SalesForce SOBJECTYPE is not specified, please specify SalesForce SOBJECTYPE");
    }
    /*if (conf.get(HIHOConf.SALESFORCE_HEADERS) == null) {
      throw new HIHOException(
          "The SalesForce Headers is not specified, please specify SalesForce Headers");
View Full Code Here

    }
  }
 
  public void checkMandatoryConfs() throws HIHOException {
    if (inputPath == null) {
      throw new HIHOException(
          "The provided input path is empty, please specify inputPath");
    }
  }
View Full Code Here

      // w.append(createQuery + "\n" + loadQuery);
      w.close();
      fos.close();
    } catch (Exception e) {
      e.printStackTrace();
      throw new HIHOException("Could not generate hive table", e);
    }
  }
View Full Code Here

        String path = conf.get(HIHOConf.INPUT_OUTPUT_LOADTO_PATH)
            + "hiveScript" + tableName + ".txt";
        fos = new FileOutputStream(path, true);
      }
    } catch (FileNotFoundException e) {
      throw new HIHOException();
    }
    return fos;
  }
View Full Code Here

     * (conf.get(HIHOConf.HIVE_MULTIPLE_PARTITION_BY) != null &&
     * conf.get(HIHOConf.HIVE_TABLE_NAME) != null) { tableName =
     * conf.get(HIHOConf.HIVE_TABLE_NAME); }
     */
    if (tableName == null) {
      throw new HIHOException("Cannot get hive table name");
    }
    return tableName;
  }
View Full Code Here

    int res = ToolRunner.run(createJobConf(), job, args);
    assertEquals(0, res);
    // lets verify the result now
    File pigScript = new File("/tmp/pigScript.txt");     
    if(!(pigScript.exists())){
      throw new HIHOException("Unable to generate Pig script");
    }
    logger.debug("Pig script output is  " + pigScript.exists());   
  }
View Full Code Here

    }
  }

  public void checkMandatoryConfs() throws HIHOException {
    if (inputFormat == null) {
      throw new HIHOException(
          "The provided input format is empty, please specify inputFormat");
    }
    if (dedupBy == null) {
      throw new HIHOException(
          "The provided value of dedupBy is empty, please specify either key or value");
    }
    if ((!dedupBy.equals("key")) && (!dedupBy.equals("value"))) {
      throw new HIHOException(
          "The provided value of dedupBy is Incorrect, please specify either key or value");
    }
    if (inputKeyClassName == null) {
      throw new HIHOException(
          "The provided input key class name is empty, please specify inputKeyClassName");
    }
    if (inputValueClassName == null) {
      throw new HIHOException(
          "The provided input value class name is empty, please specify inputValueClassName");
    }
    if (inputPath == null) {
      throw new HIHOException(
          "The provided input path is empty, please specify inputPath");
    }
    if (outputPath == null) {
      throw new HIHOException(
          "The provided output path is empty, please specify outputPath");
    }
    if (outputFormat == null) {
      System.out.println(outputFormat);
      throw new HIHOException(
          "The provided output format is empty, please specify outputFormat");
    }
  }
View Full Code Here

TOP

Related Classes of co.nubetech.hiho.common.HIHOException

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.