Examples of ExternalId


Examples of de.lmu.ifi.dbs.elki.data.ExternalID

   */
  private Object[] parseLine(String line) {
    List<String> entries = tokenize(line);
    Iterator<String> iter = entries.iterator();

    ExternalID eid = null;
    LabelList labels = null;
    List<Polygon> polys = new java.util.Vector<Polygon>(1);

    List<Vector> coords = new ArrayList<Vector>();
    while(iter.hasNext()) {
      String cur = iter.next();
      Matcher m = COORD.matcher(cur);
      if(m.find()) {
        try {
          double c1 = Double.parseDouble(m.group(1));
          double c2 = Double.parseDouble(m.group(2));
          if(m.group(3) != null) {
            double c3 = Double.parseDouble(m.group(3));
            coords.add(new Vector(new double[] { c1, c2, c3 }));
          }
          else {
            coords.add(new Vector(new double[] { c1, c2 }));
          }
          continue;
        }
        catch(NumberFormatException e) {
          logger.warning("Looked like a coordinate pair but didn't parse: " + cur);
        }
      }
      // Polygon separator.
      if(cur.equals(POLYGON_SEPARATOR)) {
        if(coords.size() > 0) {
          polys.add(new Polygon(coords));
          coords = new ArrayList<Vector>();
        }
        continue;
      }
      // First label will become the External ID
      if(eid == null) {
        eid = new ExternalID(cur);
      }
      else {
        // Label
        if(labels == null) {
          labels = new LabelList(1);
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.ExternalID

      {
        Relation<LabelList> olq = database.getDatabase().getRelation(TypeUtil.LABELLIST);
        Relation<ExternalID> eidq = database.getDatabase().getRelation(TypeUtil.EXTERNALID);
        for(DBID id : database.iterDBIDs()) {
          if(eidq != null) {
            ExternalID eid = eidq.get(id);
            if(eid != null) {
              lblmap.put(eid.toString(), id);
            }
          }
          if(olq != null) {
            LabelList label = olq.get(id);
            if(label != null) {
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.ExternalID

        data[out] = ll;
      }
      else if(elkitypes[out] == TypeUtil.EXTERNALID) {
        String val = (String) map.get(s);
        if(val != null) {
          data[out] = new ExternalID(val);
        }
        else {
          throw new AbortException("External ID column not set in sparse instance." + tokenizer.toString());
        }
      }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.ExternalID

      }
      else if(etyp[out] == TypeUtil.EXTERNALID) {
        if(tokenizer.ttype != StreamTokenizer.TT_WORD) {
          throw new AbortException("Expected word token, got: " + tokenizer.toString());
        }
        data[out] = new ExternalID(tokenizer.sval);
        nextToken(tokenizer);
      }
      else if(etyp[out] == TypeUtil.CLASSLABEL) {
        if(tokenizer.ttype != StreamTokenizer.TT_WORD) {
          throw new AbortException("Expected word token, got: " + tokenizer.toString());
View Full Code Here

Examples of org.apache.falcon.entity.ExternalId

        waitForWorkflow(START_INSTANCE, WorkflowJob.Status.RUNNING);
    }

    private void waitForWorkflow(String instance, WorkflowJob.Status status) throws Exception {
        TestContext context = new TestContext();
        ExternalId extId = new ExternalId(context.processName, Tag.DEFAULT, EntityUtil.parseDateUTC(instance));
        OozieClient ozClient = OozieClientFactory.get(
                (Cluster) ConfigurationStore.get().get(EntityType.CLUSTER, context.clusterName));
        String jobId = ozClient.getJobId(extId.getId());
        WorkflowJob jobInfo = null;
        for (int i = 0; i < 15; i++) {
            jobInfo = ozClient.getJobInfo(jobId);
            if (jobInfo.getStatus() == status) {
                break;
View Full Code Here

Examples of org.apache.falcon.entity.ExternalId

            DEFAULT_BROKER_MSG_TTL.toString());
        props.put(ARG.brokerTTL.getPropName(), jmsMessageTTL);
        props.put(ARG.entityType.getPropName(), entity.getEntityType().name());
        props.put("logDir", getStoragePath(new Path(coordPath, "../../logs")));
        props.put(OozieClient.EXTERNAL_ID,
            new ExternalId(entity.getName(), EntityUtil.getWorkflowNameTag(coordName, entity),
                "${coord:nominalTime()}").getId());
        props.put("workflowEngineUrl", ClusterHelper.getOozieUrl(cluster));
        try {
            if (EntityUtil.getLateProcess(entity) == null
                || EntityUtil.getLateProcess(entity).getLateInputs() == null
View Full Code Here

Examples of org.apache.falcon.entity.ExternalId

        waitForWorkflow(START_INSTANCE, WorkflowJob.Status.RUNNING);
    }

    private void waitForWorkflow(String instance, WorkflowJob.Status status) throws Exception {
        TestContext context = new TestContext();
        ExternalId extId = new ExternalId(context.processName, Tag.DEFAULT, EntityUtil.parseDateUTC(instance));
        ProxyOozieClient ozClient = OozieClientFactory.get(
                (Cluster) ConfigurationStore.get().get(EntityType.CLUSTER, context.clusterName));
        String jobId = ozClient.getJobId(extId.getId());
        WorkflowJob jobInfo = null;
        for (int i = 0; i < 15; i++) {
            jobInfo = ozClient.getJobInfo(jobId);
            if (jobInfo.getStatus() == status) {
                break;
View Full Code Here

Examples of org.apache.falcon.entity.ExternalId

                DEFAULT_BROKER_MSG_TTL.toString());
        props.put(ARG.brokerTTL.getPropName(), jmsMessageTTL);
        props.put(ARG.entityType.getPropName(), entity.getEntityType().name());
        props.put("logDir", getStoragePath(new Path(coordPath, "../../logs")));
        props.put(OozieClient.EXTERNAL_ID,
                new ExternalId(entity.getName(), EntityUtil.getWorkflowNameTag(coordName, entity),
                        "${coord:nominalTime()}").getId());
        props.put("workflowEngineUrl", ClusterHelper.getOozieUrl(cluster));
        try {
            if (EntityUtil.getLateProcess(entity) == null
                    || EntityUtil.getLateProcess(entity).getLateInputs() == null
View Full Code Here

Examples of org.apache.falcon.entity.ExternalId

                DEFAULT_BROKER_MSG_TTL.toString());
        props.put(ARG.brokerTTL.getPropName(), jmsMessageTTL);
        props.put(ARG.entityType.getPropName(), entity.getEntityType().name());
        props.put("logDir", getStoragePath(new Path(coordPath, "../../logs")));
        props.put(OozieClient.EXTERNAL_ID,
                new ExternalId(entity.getName(), EntityUtil.getWorkflowNameTag(coordName, entity),
                        "${coord:nominalTime()}").getId());
        props.put("workflowEngineUrl", ClusterHelper.getOozieUrl(cluster));
        try {
            if (EntityUtil.getLateProcess(entity) == null
                    || EntityUtil.getLateProcess(entity).getLateInputs() == null
View Full Code Here

Examples of org.apache.ivory.entity.ExternalId

        props.put(ARG.brokerImplClass.getPropName(), ivoryBrokerImplClass);
        String jmsMessageTTL = StartupProperties.get().getProperty("broker.ttlInMins", DEFAULT_BROKER_MSG_TTL.toString());
        props.put(ARG.brokerTTL.getPropName(), jmsMessageTTL);
        props.put(ARG.entityType.getPropName(), entity.getEntityType().name());
        props.put("logDir", getStoragePath(new Path(coordPath, "../../logs")));
        props.put(OozieClient.EXTERNAL_ID, new ExternalId(entity.getName(), EntityUtil.getWorkflowNameTag(coordName, entity),
                "${coord:nominalTime()}").getId());
        props.put("workflowEngineUrl", ClusterHelper.getOozieUrl(cluster));
    try {
      if (EntityUtil.getLateProcess(entity) == null
          || EntityUtil.getLateProcess(entity).getLateInputs() == null
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.