Examples of Tuple


Examples of net.minecraft.util.Tuple

    @SuppressWarnings("unchecked")
    public static void addEmeraldBuyRecipe(EntityVillager villager, MerchantRecipeList list, Random random, Item item, float chance, int min, int max)
    {
        if (min > 0 && max > 0)
        {
            EntityVillager.villagersSellingList.put(item, new Tuple(min, max));
        }
        EntityVillager.func_146091_a(list, item, random, chance);
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.cursor.Tuple

    private void prefetch() throws NamingException
    {
        while ( underlying.hasMore() )
        {
            Tuple tuple = underlying.next();

            if ( swapKeyVal )
            {
                throw new NotImplementedException();
                // tmp.setSwapped( tuple, null );
View Full Code Here

Examples of org.apache.directory.mavibot.btree.Tuple

        bs.sort( file );
       
        Iterator<Tuple<Dn, String>> itr = bs.getMergeSortedTuples();
        while( itr.hasNext() )
        {
            Tuple t = itr.next();
            System.out.println( t.getKey() + " - " + t.getValue() );
        }
       
        //BTreeBuilder<, V>
    }
View Full Code Here

Examples of org.apache.directory.server.xdbm.Tuple

    private void prefetch() throws NamingException
    {
        while ( underlying.hasMore() )
        {
            Tuple tuple = underlying.next();

            if ( swapKeyVal )
            {
                throw new NotImplementedException();
                // tmp.setSwapped( tuple, null );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.cursor.Tuple

    private void prefetch() throws NamingException
    {
        while ( underlying.hasMore() )
        {
            Tuple tuple = underlying.next();

            if ( swapKeyVal )
            {
                throw new NotImplementedException();
                // tmp.setSwapped( tuple, null );
View Full Code Here

Examples of org.apache.flink.api.java.tuple.Tuple

    edgesUsed = true;
   
    outValue.f1 = m;
   
    while (edges.hasNext()) {
      Tuple next = (Tuple) edges.next();
      VertexKey k = next.getField(1);
      outValue.f0 = k;
      out.collect(outValue);
    }
  }
View Full Code Here

Examples of org.apache.flink.test.recordJobs.util.Tuple

   *
   */
  @Override
  public void map(Record record, Collector<Record> out) throws Exception
  {
    Tuple inputTuple = record.getField(1, Tuple.class);
   
    /* Extract the year from the date element of the order relation: */
   
    /* pice = extendedprice * (1 - discount): */
    float price = Float.parseFloat(inputTuple.getStringValueAt(5)) * (1 - Float.parseFloat(inputTuple.getStringValueAt(6)));
    /* Project (orderkey | partkey, suppkey, linenumber, quantity, extendedprice, discount, tax, ...) to (partkey, suppkey, quantity): */
    inputTuple.project((0 << 0) | (1 << 1) | (1 << 2) | (0 << 3) | (1 << 4));
    inputTuple.addAttribute("" + price);
    record.setField(1, inputTuple);
    out.collect(record);
  }
View Full Code Here

Examples of org.apache.ldap.server.partition.impl.btree.Tuple

                return new EmptyEnumeration();
            }
            else
            {
                return new SingletonEnumeration(
                    new Tuple( key, getRaw( key ) ) );
            }
        }

        set = ( TreeSet ) getRaw( key );
        if ( set == null )
View Full Code Here

Examples of org.apache.phoenix.schema.tuple.Tuple

                // Build Map with evaluated hash key as key and row as value
                for (int i = 0; i < nRows; i++) {
                    int resultSize = (int)Bytes.readVLong(hashCacheByteArray, offset);
                    offset += WritableUtils.decodeVIntSize(hashCacheByteArray[offset]);
                    ImmutableBytesWritable value = new ImmutableBytesWritable(hashCacheByteArray,offset,resultSize);
                    Tuple result = new ResultTuple(new Result(value));
                    ImmutableBytesPtr key = TupleUtil.getConcatenatedValue(result, onExpressions);
                    List<Tuple> tuples = hashCacheMap.get(key);
                    if (tuples == null) {
                        tuples = new LinkedList<Tuple>();
                        hashCacheMap.put(key, tuples);
View Full Code Here

Examples of org.apache.pig.data.Tuple

        //col_uft8: (name: chararray,value: chararray),
        //col_uuid: (name: chararray,value: chararray),
        //columns: {(name: chararray,value: chararray)}}
        Iterator<Tuple> it = pig.openIterator("rows");
        if (it.hasNext()) {
            Tuple t = it.next();
            Assert.assertEquals(t.get(0), "foo");
            Tuple column = (Tuple) t.get(1);
            Assert.assertEquals(column.get(1), "ascii");
            column = (Tuple) t.get(2);
            Assert.assertEquals(column.get(1), false);
            column = (Tuple) t.get(3);
            Assert.assertEquals(column.get(1), new DataByteArray(Hex.hexToBytes("DEADBEEF")));
            column = (Tuple) t.get(4);
            Assert.assertEquals(column.get(1), 1296705900000L);
            column = (Tuple) t.get(5);
            Assert.assertEquals(column.get(1), "23.345");
            column = (Tuple) t.get(6);
            Assert.assertEquals(column.get(1), 2.7182818284590451d);
            column = (Tuple) t.get(7);
            Assert.assertEquals(column.get(1), 23.45f);
            column = (Tuple) t.get(8);
            Assert.assertEquals(column.get(1), "127.0.0.1");
            column = (Tuple) t.get(9);
            Assert.assertEquals(column.get(1), 23);
            column = (Tuple) t.get(10);
            Assert.assertEquals(column.get(1), 12345);
            column = (Tuple) t.get(11);
            Assert.assertEquals(column.get(1), new DataByteArray((TimeUUIDType.instance.fromString("e23f450f-53a6-11e2-7f7f-7f7f7f7f7f77").array())));
            column = (Tuple) t.get(12);
            Assert.assertEquals(column.get(1), 12345678L);
            column = (Tuple) t.get(13);
            Assert.assertEquals(column.get(1), new DataByteArray((TimeUUIDType.instance.fromString("e23f450f-53a6-11e2-7f7f-7f7f7f7f7f7f").array())));
            column = (Tuple) t.get(14);
            Assert.assertEquals(column.get(1), "hello");
            column = (Tuple) t.get(15);
            Assert.assertEquals(column.get(1), new DataByteArray((UUIDType.instance.fromString("550e8400-e29b-41d4-a716-446655440000").array())));
        }

        pig.registerQuery("cc_rows = LOAD 'cassandra://thriftKs/CC?" + defaultParameters + "' USING CassandraStorage();");

        //(chuck,{(kick,3)})
        it = pig.openIterator("cc_rows");
        if (it.hasNext()) {
            Tuple t = it.next();
            Assert.assertEquals(t.get(0), "chuck");          
            DataBag columns = (DataBag) t.get(1);
            Iterator<Tuple> iter = columns.iterator();
            if(iter.hasNext())
            {
                Tuple column = iter.next();
                Assert.assertEquals(column.get(0), "kick");
                Assert.assertEquals(column.get(1), 3L);
            }
         }
    }
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.