Examples of strings()


Examples of org.apache.commons.weaver.test.beans.ComplexAnnotations.NestAnnotation.strings()

        assertEquals((short) 0, nest2_1.shortValue());
        assertArrayEquals(new short[] { 0 }, nest2_1.shortValues());
        assertSame(CURLY, nest2_1.stooge());
        assertArrayEquals(new Stooge[] { MOE, LARRY, SHEMP }, nest2_1.stooges());
        assertEquals("", nest2_1.string());
        assertArrayEquals(new String[] { "" }, nest2_1.strings());
        assertEquals(Object[].class, nest2_1.type());
        assertArrayEquals(new Class[] { Object[].class }, nest2_1.types());

        assertEquals((short) 0, anno2.shortValue());
        assertArrayEquals(new short[] { 0 }, anno2.shortValues());
View Full Code Here

Examples of org.apache.commons.weaver.test.beans.ComplexAnnotations.TestAnnotation.strings()

        assertEquals((short) 0, anno1.shortValue());
        assertArrayEquals(new short[] { 0 }, anno1.shortValues());
        assertSame(SHEMP, anno1.stooge());
        assertArrayEquals(new Stooge[] { MOE, LARRY, CURLY }, anno1.stooges());
        assertEquals("", anno1.string());
        assertArrayEquals(new String[] { "" }, anno1.strings());
        assertEquals(Object.class, anno1.type());
        assertArrayEquals(new Class[] { Object.class }, anno1.types());

        TestAnnotation anno2 = fields.get("dummy2").getAnnotation(TestAnnotation.class);
        assertFalse(anno2.booleanValue());
View Full Code Here

Examples of org.apache.commons.weaver.test.beans.ComplexAnnotations.TestAnnotation.strings()

        assertEquals((short) 0, anno2.shortValue());
        assertArrayEquals(new short[] { 0 }, anno2.shortValues());
        assertSame(SHEMP, anno2.stooge());
        assertArrayEquals(new Stooge[] { MOE, LARRY, CURLY }, anno2.stooges());
        assertEquals("", anno2.string());
        assertArrayEquals(new String[] { "" }, anno2.strings());
        assertEquals(Object.class, anno2.type());
        assertArrayEquals(new Class[] { Object.class }, anno2.types());
    }

    @Test
View Full Code Here

Examples of org.apache.crunch.types.PTypeFamily.strings()

        PageRankData prd = input.second();
        for (String link : prd.urls) {
          emitter.emit(Pair.of(link, prd.propagatedScore()));
        }
      }
    }, ptf.tableOf(ptf.strings(), ptf.floats()));

    return input.cogroup(outbound).mapValues(
        new MapFn<Pair<Collection<PageRankData>, Collection<Float>>, PageRankData>() {
          @Override
          public PageRankData map(Pair<Collection<PageRankData>, Collection<Float>> input) {
View Full Code Here

Examples of org.apache.crunch.types.PTypeFamily.strings()

        PageRankData prd = input.second();
        for (String link : prd.urls) {
          emitter.emit(Pair.of(link, prd.propagatedScore()));
        }
      }
    }, ptf.tableOf(ptf.strings(), ptf.floats()));

    return input.cogroup(outbound).mapValues(
        new MapFn<Pair<Collection<PageRankData>, Collection<Float>>, PageRankData>() {
          @Override
          public PageRankData map(Pair<Collection<PageRankData>, Collection<Float>> input) {
View Full Code Here

Examples of org.apache.crunch.types.PTypeFamily.strings()

  }

  private static <T> PTable<String, BloomFilter> createFilterTable(PCollection<T> collection, BloomFilterFn<T> filterFn) {
    PTypeFamily tf = collection.getTypeFamily();
    PTable<String, BloomFilter> table = collection.parallelDo(filterFn,
        tf.tableOf(tf.strings(), Writables.writables(BloomFilter.class)));
    return table.groupByKey(1).combineValues(new BloomFilterAggregator());
  }


  @SuppressWarnings("serial")
View Full Code Here

Examples of org.apache.crunch.types.PTypeFamily.strings()

                Pair<String, String> pair = Pair.of(word.toLowerCase(Locale.ENGLISH), title);
                emitter.emit(pair);
              }
            }
          }
        }, ptf.pairs(ptf.strings(), ptf.strings())));

    if (transformTF) {
      /*
       * Input: Pair<Pair<String, String>, Long> Pair<Pair<word, title>, count
       * in title>
View Full Code Here

Examples of org.apache.crunch.types.PTypeFamily.strings()

                Pair<String, String> pair = Pair.of(word.toLowerCase(Locale.ENGLISH), title);
                emitter.emit(pair);
              }
            }
          }
        }, ptf.pairs(ptf.strings(), ptf.strings())));

    if (transformTF) {
      /*
       * Input: Pair<Pair<String, String>, Long> Pair<Pair<word, title>, count
       * in title>
View Full Code Here

Examples of org.apache.crunch.types.PTypeFamily.strings()

            @Override
            public Pair<String, Pair<String, Long>> map(Pair<Pair<String, String>, Long> input) {
              Pair<String, String> wordDocumentPair = input.first();
              return Pair.of(wordDocumentPair.first(), Pair.of(wordDocumentPair.second(), input.second()));
            }
          }, ptf.tableOf(ptf.strings(), ptf.pairs(ptf.strings(), ptf.longs())));

      pipeline.writeTextFile(wordDocumentCountPair, transformedOutput.getAbsolutePath());
    }

    SourceTarget<String> st = At.textFile(tfOutput.getAbsolutePath());
View Full Code Here

Examples of org.apache.crunch.types.PTypeFamily.strings()

            @Override
            public Pair<String, Pair<String, Long>> map(Pair<Pair<String, String>, Long> input) {
              Pair<String, String> wordDocumentPair = input.first();
              return Pair.of(wordDocumentPair.first(), Pair.of(wordDocumentPair.second(), input.second()));
            }
          }, ptf.tableOf(ptf.strings(), ptf.pairs(ptf.strings(), ptf.longs())));

      pipeline.writeTextFile(wordDocumentCountPair, transformedOutput.getAbsolutePath());
    }

    SourceTarget<String> st = At.textFile(tfOutput.getAbsolutePath());
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.