Package java.util

Examples of java.util.Properties.keys()


    // it makes calls to the hcat server - we don't want these to happen in
    // the backend
    // in the hadoop front end mapred.task.id property will not be set in
    // the Configuration
    if (udfProps.containsKey(HCatConstants.HCAT_PIG_LOADER_LOCATION_SET)) {
      for (Enumeration<Object> emr = udfProps.keys(); emr.hasMoreElements(); ) {
        PigHCatUtil.getConfigFromUDFProperties(udfProps,
          job.getConfiguration(), emr.nextElement().toString());
      }
      if (!HCatUtil.checkJobContextIfRunningFromBackend(job)) {
        //Combine credentials and credentials from job takes precedence for freshness
View Full Code Here


    Properties udfProps = UDFContext.getUDFContext().getUDFProperties(
      this.getClass(), new String[]{sign});
    String[] userStr = location.split("\\.");

    if (udfProps.containsKey(HCatConstants.HCAT_PIG_STORER_LOCATION_SET)) {
      for (Enumeration<Object> emr = udfProps.keys(); emr.hasMoreElements(); ) {
        PigHCatUtil.getConfigFromUDFProperties(udfProps, config, emr.nextElement().toString());
      }
      Credentials crd = jobCredentials.get(INNER_SIGNATURE_PREFIX + "_" + sign);
      if (crd != null) {
        job.getCredentials().addAll(crd);
View Full Code Here

                    System.out.println("Pid:            " + pid);
                    if (!minimal) {
                        Properties properties = clusterConfigurations.get(pid);
                        if (properties != null) {
                            System.out.println("Properties:");
                            for (Enumeration e = properties.keys(); e.hasMoreElements(); ) {
                                Object key = e.nextElement();
                                System.out.println("   " + key + " = " + properties.get(key));
                            }
                        }
                    }
View Full Code Here

    // it makes calls to the hcat server - we don't want these to happen in
    // the backend
    // in the hadoop front end mapred.task.id property will not be set in
    // the Configuration
    if (udfProps.containsKey(HCatConstants.HCAT_PIG_LOADER_LOCATION_SET)) {
      for (Enumeration<Object> emr = udfProps.keys(); emr.hasMoreElements(); ) {
        PigHCatUtil.getConfigFromUDFProperties(udfProps,
          job.getConfiguration(), emr.nextElement().toString());
      }
      if (!HCatUtil.checkJobContextIfRunningFromBackend(job)) {
        //Combine credentials and credentials from job takes precedence for freshness
View Full Code Here

    File f = new File(PROPERTIES_FILE_PATH);
    FileInputStream fis = null;
    try {
      fis = new FileInputStream(f);
      properties.load(fis);
      Enumeration keys = properties.keys();
      while (keys.hasMoreElements()) {
        Object key = keys.nextElement();
        Object value = properties.get(key);
        getProperties().put(key, value);
      }
View Full Code Here

        Properties props = getProperties(parent, JARS_PROPS_FILE);

        LOG.fine(props.toString());

        Enumeration<Object> keys = props.keys();

        while (keys.hasMoreElements()) {
            String key = (String)keys.nextElement();
            URL url = parent.getResource(key);
View Full Code Here

        // load the configuration file as properties
        customFieldProps.loadFromXML(fis);

        // loop through the properties setting field flags
        Enumeration propKeys = customFieldProps.keys();
        while (propKeys.hasMoreElements()) {
          String prop = (String)propKeys.nextElement();
          if (prop.endsWith(".name")) {
            String propName = prop.substring(0, prop.length() - 5);
            String name = customFieldProps.getProperty(prop);
View Full Code Here

        configFile);
      if (fis == null) {
        throw new IOException("Was unable to open " + configFile);
      }
      customFieldProps.loadFromXML(fis);
      Enumeration keys = customFieldProps.keys();
      while (keys.hasMoreElements()) {
        String prop = (String)keys.nextElement();
        if (prop.endsWith(".name")) {
          String propName = prop.substring(0, prop.length() - 5);
          String name = customFieldProps.getProperty(prop);
View Full Code Here

        } else {
            cfg = getProperties(iniFile);
        }
               
        if (cfg != null) {
            Enumeration cfgEnum = cfg.keys();
            while (cfgEnum.hasMoreElements()) {
                String pName = (String) cfgEnum.nextElement();
                Object pValue = cfg.getProperty(pName);
               
                if (pValue instanceof String) pValue = ((String)pValue).trim();
View Full Code Here

      Document doc =
        DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
      Element conf = doc.createElement("configuration");
      doc.appendChild(conf);
      conf.appendChild(doc.createTextNode("\n"));
      for (Enumeration e = properties.keys(); e.hasMoreElements();) {
        String name = (String)e.nextElement();
        Object object = properties.get(name);
        String value = null;
        if (object instanceof String) {
          value = (String) object;
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.