Examples of take()


Examples of org.apache.spark.api.java.JavaRDD.take()

        });

        assertThat((int) data.count(), is(2));
        System.out.println(data.take(10));
        System.out.println(messages);
        System.out.println(fooBar.take(2));
        System.out.println(map.take(10));
    }
}
View Full Code Here

Examples of org.apache.spark.sql.api.java.JavaSchemaRDD.take()

  public void testBasicRead() throws Exception {
    JavaSchemaRDD schemaRDD = artistsAsSchemaRDD();
    assertTrue(schemaRDD.count() > 300);
    schemaRDD.registerTempTable("datfile");
    System.out.println(schemaRDD.schemaString());
    assertEquals(5, schemaRDD.take(5).size());
    JavaSchemaRDD results = sqc
        .sql("SELECT name FROM datfile WHERE id >=1 AND id <=10");
    assertEquals(10, schemaRDD.take(10).size());
  }
View Full Code Here

Examples of org.fireflow.kernel.ILoopInstance.take()

            for (int i = 0; i < this.leavingLoopInstances.size(); i++) {
             
                ILoopInstance loopInstance = this.leavingLoopInstances.get(i);

                doLoop = loopInstance.take(tokenForLoop);
                if (doLoop) {
                    break;
                }
            }
        }
View Full Code Here

Examples of org.fireflow.kernel.ITransitionInstance.take()

            targetActivityInstance.fire(token);
        } else {
            //按照定义,activity有且只有一个输出弧,所以此处只进行一次循环。
            for (int i = 0; leavingTransitionInstances != null && i < leavingTransitionInstances.size(); i++) {
                ITransitionInstance transInst = leavingTransitionInstances.get(i);
                transInst.take(token);
            }
        }

        if (token.isAlive()) {
            NodeInstanceEvent event = new NodeInstanceEvent(this);
View Full Code Here

Examples of org.infinispan.distexec.DistributedExecutionCompletionService.take()

                  }
               }

               for (int i = 0; i < members.size() - 1; ++i) {
                  try {
                     decs.take().get();
                  } catch (InterruptedException e) {
                     throw new CacheListenerException(e);
                  } catch (ExecutionException e) {
                     throw new CacheListenerException(e);
                  }
View Full Code Here

Examples of org.jbpm.pvm.internal.model.ExecutionImpl.take()

        // launch a concurrent path of execution
        String childExecutionName = transition.getName();
        ExecutionImpl concurrentExecution = concurrentRoot.createExecution(childExecutionName);
        concurrentExecution.setActivity(activity);
        concurrentExecution.setState(Execution.STATE_ACTIVE_CONCURRENT);
        concurrentExecution.take(transition);
       
        if (concurrentRoot.isEnded()) {
          break;
        }
      }
View Full Code Here

Examples of org.jbpm.pvm.internal.task.TaskImpl.take()

    TaskImpl task = dbSession.get(TaskImpl.class, Long.parseLong(taskId));
    if (task==null) {
      throw new JbpmException("task "+taskId+" does not exist");
    }
    if (take) {
      task.take(userId);
    } else {
      task.setAssignee(userId, true);
    }
   
    HistoryEvent.fire(new TaskAssign(task, userId));
View Full Code Here

Examples of org.mule.util.queue.Queue.take()

      throw new MessagingException("Channel is closed");
    }
    try {
      QueueSession qs = container.getQueueSession();
      Queue queue = qs.getQueue(componentName);
      MessageExchange me = (MessageExchange) queue.take();
      if (me != null) {
        handleReceive(me);
      }
      return me;
    } catch (InterruptedException e) {
View Full Code Here

Examples of org.persvr.remote.EventStream.take()

        public synchronized void onEvent()  throws IOException{
          final EventStream eventStream = (Client) request.getSession().getAttribute(clientId);

         
         
          Notification notification= eventStream.eventAvailable() ? eventStream.take(0) : null;
          if (notification != null) { // we are resuming
            try {
             
              if (sendEvent(notification, eventStream, serializer)) {
                System.err.println("connection closed by server" + request);
View Full Code Here

Examples of org.switchyard.transform.xslt.internal.TransformerPool.take()

    }

    @Test
    public void takeAndGive() throws Exception {
        TransformerPool pool = new TransformerPool(templates, 1);
        Transformer t1 = pool.take();
        Assert.assertNotNull(t1);
        pool.give(t1);
        Transformer t2 = pool.take();
        Assert.assertNotNull(t2);
        Assert.assertEquals(t1, t2);
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.