Examples of Slot


Examples of com.asakusafw.compiler.flow.mapreduce.parallel.Slot

    }

    private Slot toSlot(Output output, String name) {
        assert output != null;
        assert name != null;
        return new Slot(
                name,
                output.getDescription().getDataType(),
                Collections.<String>emptyList(),
                output.getSources(),
                extract(output.getDescription()).getOutputFormat());
View Full Code Here

Examples of com.asakusafw.compiler.flow.mapreduce.parallel.Slot

            return Collections.emptyList();
        }

        List<Slot> slots = Lists.create();
        for (Output output : context.getOutputs()) {
            Slot slot = toSlot(output);
            slots.add(slot);
        }
        List<ResolvedSlot> resolved = new SlotResolver(getEnvironment()).resolve(slots);
        if (getEnvironment().hasError()) {
            return Collections.emptyList();
View Full Code Here

Examples of com.asakusafw.compiler.flow.mapreduce.parallel.Slot

    }

    private Slot toSlot(Output output) {
        BulkLoadExporterDescription desc = extract(output.getDescription());
        String name = normalize(output.getDescription().getName());
        return new Slot(
                name,
                output.getDescription().getDataType(),
                desc.getPrimaryKeyNames(),
                output.getSources(),
                TemporaryOutputFormat.class);
View Full Code Here

Examples of com.casamind.adware.server.domain.Slot

      SimpleDateFormat icalFormatter = new SimpleDateFormat("yyyyMMdd'T'HHmmss'Z'");
      SimpleDateFormat logFormatter = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm Z");
      Company company = DatastoreProxy.getCompanyByLogin(attendee);
      if (company != null) {
        log.info("Found company: " + company.getLastname());
        Slot slot = new Slot();
        slot.setOwnerId(company.getId());
        log.info("DTSTART :" + startDate);
        Date parsedStartDate = icalFormatter.parse(startDate);
        log.info("Parsed start date :" + logFormatter.format(parsedStartDate));
        log.info("DTEND :" + endDate);
        Date parsedEndDate = icalFormatter.parse(endDate);
        log.info("Parsed end date :" + logFormatter.format(parsedEndDate));
        slot.setStartDate(parsedStartDate);
        slot.setEndDate(parsedEndDate);
        slot.setStatus(SlotStatus.Ordered);
        long slotInterval = parsedEndDate.getTime() - parsedStartDate.getTime();
        log.info("Interval in miliseconds: " + slotInterval);
        long slotDurationInMilisecondes = (long) duration * 60 * 1000;
        log.info("Default slot duration in miliseconds: " + slotDurationInMilisecondes);
        long nbSlots = slotInterval / slotDurationInMilisecondes;
        log.info("Number of slots (Long): " + nbSlots);
        slot.setNbSlots((int) nbSlots);
        slot.setPrice(price);
        Slot entity = DatastoreProxy.createSlot(slot);
        log.info("Created new slot for company:" + company.getLastname());
        log.info(entity.toString());
      } else {
        log.warning("Did not find a company with attendee: " + attendee);
        log.info("Trying to a find a publisher with attendee: " + attendee);
        Publisher publisher = DatastoreProxy.getPublisherByLogin(attendee);
        if (publisher != null) {
          log.info("Found publisher with attendee: " + publisher.getFirstname() + " " + publisher.getLastname());
          Slot slot = new Slot();
          slot.setOwnerId(publisher.getId());
          log.info("DTSTART :" + startDate);
          Date parsedStartDate = icalFormatter.parse(startDate);
          log.info("Parsed start date :" + logFormatter.format(parsedStartDate));
          log.info("DTEND :" + endDate);
          Date parsedEndDate = icalFormatter.parse(endDate);
          log.info("Parsed end date :" + logFormatter.format(parsedEndDate));
          slot.setStartDate(parsedStartDate);
          slot.setEndDate(parsedEndDate);
          slot.setStatus(SlotStatus.Ordered);
          long slotInterval = parsedEndDate.getTime() - parsedStartDate.getTime();
          log.info("Interval in miliseconds: " + slotInterval);
          long slotDurationInMilisecondes = (long) duration * 60 * 1000;
          log.info("Default slot duration in miliseconds: " + slotDurationInMilisecondes);
          long nbSlots = slotInterval / slotDurationInMilisecondes;
          log.info("Number of slots (Long): " + nbSlots);
          slot.setNbSlots((int) nbSlots);
          slot.setPrice(price);
          Slot entity = DatastoreProxy.createSlot(slot);
          log.info("Created new slot for publisher:" + publisher.getFirstname() + " " + publisher.getLastname());
          log.info(entity.toString());
        } else {
          log.warning("Could not find publisher: " + attendee);
        }
        response.getWriter().println(logFormatter.format(new Date()) + " : Finshed! See the server logs for debug.");
      }
View Full Code Here

Examples of com.google.appengine.tools.pipeline.impl.model.Slot

    Barrier barrier = Barrier.dummyInstanceForTesting();
    for (Object value : slotValues) {
      if (value instanceof ListMarker) {
        List<?> valueList = ((ListMarker) value).valueList;
        List<Slot> slotList = new ArrayList<>(valueList.size());
        Slot dummyListSlot = createDummySlot();
        dummyListSlot.fill(null);
        for (Object v : valueList) {
          Slot slot = createDummySlot();
          slot.fill(v);
          slotList.add(slot);
        }
        barrier.addListArgumentSlots(dummyListSlot, slotList);
      } else if (value instanceof PhantomMarker) {
        Slot slot = createDummySlot();
        slot.fill(((PhantomMarker) value).value);
        barrier.addPhantomArgumentSlot(slot);
      } else {
        Slot slot = createDummySlot();
        slot.fill(value);
        barrier.addRegularArgumentSlot(slot);
      }

    }
    Object[] arguments = barrier.buildArgumentArray();
View Full Code Here

Examples of com.google.appengine.tools.pipeline.impl.model.Slot

    }
  }

  public static Slot createDummySlot() {
    Key dummyKey = KeyFactory.createKey("dummy", "dummy");
    return new Slot(dummyKey, dummyKey, "abc");
  }
View Full Code Here

Examples of com.google.appengine.tools.pipeline.impl.model.Slot

    if (0 == jobRecord.getRunBarrierInflated().getWaitingOnKeys().size()) {
      // If the run barrier is not waiting on anything, add a phantom filled
      // slot in order to trigger a HandleSlotFilledTask in order to trigger
      // a RunJobTask.
      Slot slot = new Slot(jobRecord.getRootJobKey(), generatorKey, graphGuid);
      jobRecord.getRunBarrierInflated().addPhantomArgumentSlot(slot);
      registerSlotFilled(updateSpec, jobRecord.getQueueSettings(), slot, null);
    }

    // Register the newly created objects with the UpdateSpec.
View Full Code Here

Examples of com.google.appengine.tools.pipeline.impl.model.Slot

      Object concreteValue = null;
      if (null != value) {
        ImmediateValue<?> iv = (ImmediateValue<?>) value;
        concreteValue = iv.getValue();
      }
      Slot slot = new Slot(rootJobKey, generatorJobKey, graphGUID);
      registerSlotFilled(updateSpec, queueSettings, slot, concreteValue);
      barrier.addRegularArgumentSlot(slot);
    } else if (value instanceof FutureValueImpl<?>) {
      FutureValueImpl<?> futureValue = (FutureValueImpl<?>) value;
      Slot slot = futureValue.getSlot();
      barrier.addRegularArgumentSlot(slot);
      updateSpec.getNonTransactionalGroup().includeSlot(slot);
    } else if (value instanceof FutureList<?>) {
      FutureList<?> futureList = (FutureList<?>) value;
      List<Slot> slotList = new ArrayList<>(futureList.getListOfValues().size());
      // The dummyListSlot is a marker slot that indicates that the
      // next group of slots forms a single list argument.
      Slot dummyListSlot = new Slot(rootJobKey, generatorJobKey, graphGUID);
      registerSlotFilled(updateSpec, queueSettings, dummyListSlot, null);
      for (Value<?> valFromList : futureList.getListOfValues()) {
        Slot slot = null;
        if (valFromList instanceof ImmediateValue<?>) {
          ImmediateValue<?> ivFromList = (ImmediateValue<?>) valFromList;
          slot = new Slot(rootJobKey, generatorJobKey, graphGUID);
          registerSlotFilled(updateSpec, queueSettings, slot, ivFromList.getValue());
        } else if (valFromList instanceof FutureValueImpl<?>) {
          FutureValueImpl<?> futureValFromList = (FutureValueImpl<?>) valFromList;
          slot = futureValFromList.getSlot();
        } else if (value instanceof FutureList<?>) {
View Full Code Here

Examples of com.mojang.minecraft.level.BlockMap$Slot

      this.slot.init(var1.xOld, var1.yOld, var1.zOld).remove(var1);
      this.all.remove(var1);
   }

   public void moved(Entity var1) {
      BlockMap$Slot var2 = this.slot.init(var1.xOld, var1.yOld, var1.zOld);
      BlockMap$Slot var3 = this.slot2.init(var1.x, var1.y, var1.z);
      if(!var2.equals(var3)) {
         var2.remove(var1);
         var3.add(var1);
         var1.xOld = var1.x;
         var1.yOld = var1.y;
         var1.zOld = var1.z;
      }
   }
View Full Code Here

Examples of edu.neu.ccs.task.Slot

    for (Map.Entry<String, String> e : topInputs.entrySet())
      topTask.setSlotValueScript(e.getKey(), e.getValue(), "init agent");
   
    if ( ! user.isGuest()) {
      int userId = user.getId();
      Slot userSlot = topTask.getType().getSlotIfExists("user");
      if ((userSlot != null) && userSlot.isInput() && !topInputs.containsKey("user")) {
        if (userSlot.getType().equals("string"))
          topTask.setSlotValue("user", Integer.toString(userId));
        else if (userSlot.getType().equals("number"))
          topTask.setSlotValue("user", userId);
      }
    }
   
    Slot lastConvSlot = topTask.getType().getSlotIfExists("lastConversation");
    if ((lastConvSlot != null) &&
      lastConvSlot.isInput() &&
      lastConvSlot.getType().equals("number") &&
      !topInputs.containsKey("lastConversation")) {
     
      Conversation c = user.getLastConversation(id);
      topTask.setSlotValue("lastConversation", c==null ? null : c.getStart());
    }
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.