Examples of RemoteEnvironment


Examples of eu.stratosphere.api.java.RemoteEnvironment

    if(!parseParameters(args)) {
      throw new RuntimeException("Unable to parse the arguments");
    }
 
    // set up execution environment
    ExecutionEnvironment env = new RemoteEnvironment("localhost", 1, null);
   
    // get input data
    DataSet<Point> points = getPointDataSet(env);
    DataSet<Centroid> centroids = getCentroidDataSet(env);
   
    // set number of bulk iterations for KMeans algorithm
    IterativeDataSet<Centroid> loop = centroids.iterate(numIterations);
   
    DataSet<Centroid> newCentroids = points
      // compute closest centroid for each point
      .map(new SelectNearestCenter()).withBroadcastSet(loop, "centroids")
      // count and sum point coordinates for each centroid
      .map(new CountAppender())
      .groupBy(0).reduce(new CentroidAccumulator())
      // compute new centroids from point counts and coordinate sums
      .map(new CentroidAverager());
   
    // feed new centroids back into next iteration
    DataSet<Centroid> finalCentroids = loop.closeWith(newCentroids);
   
    DataSet<Tuple2<Integer, Point>> clusteredPoints = points
        // assign points to final clusters
        .map(new SelectNearestCenter()).withBroadcastSet(finalCentroids, "centroids");
   
    // emit result
    if(fileOutput) {
      clusteredPoints.writeAsCsv(outputPath, "\n", " ");
    } else {
      clusteredPoints.print();
    }
    return env.createProgramPlan();
  }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RemoteEnvironment

      throw new IllegalStateException("handleFieldAnnotations cannot be used in a client");
   }

   protected boolean isIgnoreDependency(InjectionContainer container, EJB ref)
   {
      RemoteEnvironment refGroup =  container.getEnvironmentRefGroup();
     
      if (refGroup != null)
      {
         if(refGroup.getEjbReferences() != null)
         for(EJBReferenceMetaData ejbRef : refGroup.getEjbReferences())
         {
            if (ejbRef.getEjbRefName().equals(ref.name()))
            {
               return ejbRef.getIgnoreDependency() != null;
            }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RemoteEnvironment

      }
   }

   protected boolean isIgnoreDependency(InjectionContainer container, EJB ref)
   {
      RemoteEnvironment refGroup =  container.getEnvironmentRefGroup();
     
      if (refGroup != null)
      {
         if(refGroup.getEjbReferences() != null)
         for(EJBReferenceMetaData ejbRef : refGroup.getEjbReferences())
         {
            if (ejbRef.getEjbRefName().equals(ref.name()))
            {
               return ejbRef.getIgnoreDependency() != null;
            }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RemoteEnvironment

     */
    private List<BindingConfiguration> getPersistenceContextRefs(DeploymentUnit deploymentUnit, DeploymentDescriptorEnvironment environment, ClassLoader classLoader, DeploymentReflectionIndex deploymentReflectionIndex, ResourceInjectionTarget resourceInjectionTarget) throws
        DeploymentUnitProcessingException {

        List<BindingConfiguration> bindingConfigurations = new ArrayList<BindingConfiguration>();
        final RemoteEnvironment remoteEnvironment = environment.getEnvironment();
        if (remoteEnvironment == null) {
            return bindingConfigurations;
        }

        if (remoteEnvironment instanceof Environment) {
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RemoteEnvironment

     *@param classLoader               The deployment class loader
     * @param deploymentReflectionIndex The reflection index
     * @param applicationClasses    @return The bindings for the environment entries
     */
    protected List<BindingConfiguration> processDescriptorEntries(DeploymentUnit deploymentUnit, DeploymentDescriptorEnvironment environment, ResourceInjectionTarget resourceInjectionTarget, final ComponentDescription componentDescription, ClassLoader classLoader, DeploymentReflectionIndex deploymentReflectionIndex, final EEApplicationClasses applicationClasses) throws DeploymentUnitProcessingException {
        final RemoteEnvironment remoteEnvironment = environment.getEnvironment();
        final DeploymentClassIndex index = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.CLASS_INDEX);
        List<BindingConfiguration> bindingDescriptions = new ArrayList<BindingConfiguration>();

        EJBReferencesMetaData ejbRefs = remoteEnvironment.getEjbReferences();
        if (ejbRefs != null) {
            for (EJBReferenceMetaData ejbRef : ejbRefs) {
                String name = ejbRef.getEjbRefName();
                String ejbName = ejbRef.getLink();
                String lookup = ejbRef.getLookupName() != null ? ejbRef.getLookupName() : ejbRef.getMappedName();
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RemoteEnvironment

      }
   }

   protected boolean isIgnoreDependency(InjectionContainer container, EJB ref)
   {
      RemoteEnvironment refGroup =  container.getEnvironmentRefGroup();
     
      if (refGroup != null)
      {
         if(refGroup.getEjbReferences() != null)
         for(EJBReferenceMetaData ejbRef : refGroup.getEjbReferences())
         {
            if (ejbRef.getEjbRefName().equals(ref.name()))
            {
               return ejbRef.getIgnoreDependency() != null;
            }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RemoteEnvironment

      }
   }

   protected boolean isIgnoreDependency(InjectionContainer container, EJB ref)
   {
      RemoteEnvironment refGroup =  container.getEnvironmentRefGroup();
     
      if (refGroup != null)
      {
         if(refGroup.getEjbReferences() != null)
         for(EJBReferenceMetaData ejbRef : refGroup.getEjbReferences())
         {
            if (ejbRef.getEjbRefName().equals(ref.name()))
            {
               return ejbRef.getIgnoreDependency() != null;
            }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RemoteEnvironment

      }
   }

   protected boolean isIgnoreDependency(InjectionContainer container, EJB ref)
   {
      RemoteEnvironment refGroup =  container.getEnvironmentRefGroup();
     
      if (refGroup != null)
      {
         if(refGroup.getEjbReferences() != null)
         for(EJBReferenceMetaData ejbRef : refGroup.getEjbReferences())
         {
            if (ejbRef.getEjbRefName().equals(ref.name()))
            {
               return ejbRef.getIgnoreDependency() != null;
            }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RemoteEnvironment

      }
   }

   protected boolean isIgnoreDependency(InjectionContainer container, EJB ref)
   {
      RemoteEnvironment refGroup =  container.getEnvironmentRefGroup();
     
      if (refGroup != null)
      {
         if(refGroup.getEjbReferences() != null)
         for(EJBReferenceMetaData ejbRef : refGroup.getEjbReferences())
         {
            if (ejbRef.getEjbRefName().equals(ref.name()))
            {
               return ejbRef.getIgnoreDependency() != null;
            }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RemoteEnvironment

     * @param deploymentReflectionIndex The reflection index
     * @param applicationClasses
     * @return The bindings for the environment entries
     */
    protected List<BindingConfiguration> processDescriptorEntries(DeploymentUnit deploymentUnit, DeploymentDescriptorEnvironment environment, EEModuleDescription moduleDescription, ComponentDescription componentDescription, ClassLoader classLoader, DeploymentReflectionIndex deploymentReflectionIndex, final EEApplicationClasses applicationClasses) throws DeploymentUnitProcessingException {
        final RemoteEnvironment remoteEnvironment = environment.getEnvironment();
        final DeploymentClassIndex index = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.CLASS_INDEX);
        List<BindingConfiguration> bindingDescriptions = new ArrayList<BindingConfiguration>();

        EJBReferencesMetaData ejbRefs = remoteEnvironment.getEjbReferences();
        if (ejbRefs != null) {
            for (EJBReferenceMetaData ejbRef : ejbRefs) {
                String name = ejbRef.getEjbRefName();
                String ejbName = ejbRef.getLink();
                String lookup = ejbRef.getLookupName();
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.