Package org.apache.flink.types

Examples of org.apache.flink.types.LongValue


    private long count;

    @Override
    public LongValue getAggregate() {
      return new LongValue(count);
    }
View Full Code Here


    return false;
  }
 
  @Override
  public LongValue createInstance() {
    return new LongValue();
  }
View Full Code Here

    return new LongValue();
  }

  @Override
  public LongValue copy(LongValue from) {
    return copy(from, new LongValue());
  }
View Full Code Here

    record.write(target);
  }

  @Override
  public LongValue deserialize(DataInputView source) throws IOException {
    return deserialize(new LongValue(), source);
  }
View Full Code Here

    return limit;
  }
 
  @Override
  public LongValue createValue() {
    return new LongValue();
  }
View Full Code Here

    }
  }
 
  @Test
  public void testLongValue() {
    LongValue long0 = new LongValue(10);
    LongValue long1 = new LongValue(10);
    LongValue long2 = new LongValue(-10);
    LongValue long3 = new LongValue(255);
    LongValue long4 = new LongValue(Long.MAX_VALUE);
    LongValue long5 = new LongValue(Long.MAX_VALUE & 0xff80000000000000L);
    LongValue long6 = new LongValue(Long.MIN_VALUE);
    LongValue long7 = new LongValue(Long.MIN_VALUE & 0xff80000000000000L);
   
    for (int length = 2; length <= 8; length++) {
      assertNormalizableKey(long0, long1, length);
      assertNormalizableKey(long0, long2, length);
      assertNormalizableKey(long0, long3, length);
View Full Code Here

  }
 
  @Override
  public LongValue[] getValidTestResults() {
    return new LongValue[] {
      new LongValue(0L), new LongValue(1L), new LongValue(576L), new LongValue(-877678L),
      new LongValue((long) Integer.MAX_VALUE), new LongValue((long) Integer.MIN_VALUE),
      new LongValue(Long.MAX_VALUE), new LongValue(Long.MIN_VALUE), new LongValue(7656L)
    };
  }
View Full Code Here

  private long sum;  // the sum
 
  @Override
  public LongValue getAggregate() {
    return new LongValue(sum);
  }
View Full Code Here

       
        // make a few calls with various types
//        proxy.methodWithNoParameters();
       
        assertEquals(19, proxy.methodWithPrimitives(16, new StringValue("abc")));
        assertEquals(new DoubleValue(17.0), proxy.methodWithWritables(new LongValue(17)));
      }
      finally {
        if (proxy != null) {
          RPC.stopProxy(proxy);
        }
View Full Code Here

  }
 
  @Test
  public void testSerializationOfEventWithAggregateValues() {
    StringValue stringValue = new StringValue("test string");
    LongValue longValue = new LongValue(68743254);
   
    String stringValueName = "stringValue";
    String longValueName = "longValue";
   
    Aggregator<StringValue> stringAgg = new TestAggregator<StringValue>(stringValue);
View Full Code Here

TOP

Related Classes of org.apache.flink.types.LongValue

Copyright © 2018 www.massapicom. 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.