Examples of map()


Examples of org.apache.mahout.df.mapred.partial.Step0Job.Step0Mapper.map()

      while (reader.next(key, value)) {
        if (firstKey == null) {
          firstKey = key.get();
        }

        mapper.map(key, value, collector, reporter);

        size++;
      }

      mapper.close();
View Full Code Here

Examples of org.apache.mahout.df.mapreduce.partial.Step0Job.Step0Mapper.map()

        if (firstKey == null) {
          firstKey = key.get();
        }

        mapper.map(key, reader.getCurrentValue(), context);

        size++;
      }

      mapper.cleanup(context);
View Full Code Here

Examples of org.apache.sling.api.resource.ResourceResolver.map()

        buildResource("/factory/test", EMPTY_RESOURCE_LIST, resourceResolver, factoryResourceProvider);
        HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
        Mockito.when(request.getScheme()).thenReturn("http");
        Mockito.when(request.getServerPort()).thenReturn(80);
        Mockito.when(request.getServerName()).thenReturn("localhost");
        String path = resourceResolver.map(request,"/factory/test?q=123123");
        Assert.assertEquals("/factory/test?q=123123", path);
        path = resourceResolver.map(request,"/factory/test");
        Assert.assertEquals("/factory/test", path);

        // test path mapping without a request.
View Full Code Here

Examples of org.apache.sling.serviceusermapping.impl.Mapping.map()

        TestCase.assertEquals(getField(mapping, "serviceName"), serviceName);
        TestCase.assertEquals(getField(mapping, "subServiceName"), subServiceName);
        TestCase.assertEquals(getField(mapping, "userName"), userName);

        // mapping
        TestCase.assertEquals(userName, mapping.map(serviceName, subServiceName));
        if (subServiceName == null) {
            // Mapping without subServiceName must not match request with any
            // subServiceName
            TestCase.assertNull(mapping.map(serviceName, subServiceName + "-garbage"));
        } else {
View Full Code Here

Examples of org.apache.solr.uima.processor.UIMAToSolrMapper.map()

          UIMAToSolrMapper uimaToSolrMapper = new UIMAToSolrMapper(solrInputDocument, jcas);
          /* get field mapping from config */
          /* map type features on fields */
          for (String typeFQN : solrUIMAConfiguration.getTypesFeaturesFieldsMapping().keySet()) {
            uimaToSolrMapper.map(typeFQN, solrUIMAConfiguration.getTypesFeaturesFieldsMapping().get(typeFQN));
          }
        }
      }
    } catch (Exception e) {
      String logField = solrUIMAConfiguration.getLogField();
View Full Code Here

Examples of org.apache.spark.api.java.JavaPairRDD.map()

        long messages = data.filter(new Function<Tuple2<Text, MapWritable>, Boolean>() {
            public Boolean call(Tuple2<Text, MapWritable> t) { return t._2.containsKey(new Text("message")); }
        }).count();

        JavaRDD map = data.map(new Function<Tuple2<Text, MapWritable>, Map<String, Object>>() {
            public Map<String, Object> call(Tuple2<Text, MapWritable> v1) throws Exception {
                return (Map<String, Object>) WritableUtils.fromWritable(v1._2);
            }
        });
View Full Code Here

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

    // SQL can be run over RDDs that have been registered as tables.
    JavaSchemaRDD teenagers = sqlCtx.sql("SELECT name FROM people WHERE age >= 13 AND age <= 19");

    // The results of SQL queries are SchemaRDDs and support all the normal RDD operations.
    // The columns of a row in the result can be accessed by ordinal.
    List<String> teenagerNames = teenagers.map(new Function<Row, String>() {
      public String call(Row row) {
        return "Name: " + row.getString(0);
      }
    }).collect();
View Full Code Here

Examples of org.apache.stratum.xo.Mapper.map()

    {
        try
        {
            Mapper m = new Mapper();
            m.setDebug(true);
            Container c = (Container) m.map(new File(TEST_DOCUMENT), TEST_CLASS);
           
            assertEquals("item1",c.getItem(0).getName());
            assertEquals("item2",c.getItem(1).getName());
        }           
        catch (Exception e)
View Full Code Here

Examples of org.apache.tomcat.lite.http.BaseMapper.map()

            mapper.addWrapper(hostN, "/foo/bar", "/fo/*", "wrapper0");
        }
        int N = 10000;
        for (int i = 0; i < N; i++) {
            mappingData.recycle();
            mapper.map(host, uri, mappingData);
        }

        long time = System.currentTimeMillis();
        for (int i = 0; i < N; i++) {
            mappingData.recycle();
View Full Code Here

Examples of org.apache.tomcat.util.http.mapper.Mapper.map()

        String dispatchPath = (String) request.getAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR);
        mb.setString(webContext.getName() + dispatchPath);

        try {
            mapper.map(mb, mappingData);
            StandardWrapper wrapper = (StandardWrapper) mappingData.wrapper;
            return wrapper.getName();
        } catch (Exception e) {
            log.error(e.getMessage(), e);
        }
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.