Package cascading.tuple.type

Examples of cascading.tuple.type.DateType


    {
    getPlatform().copyFromLocal( inputFileApacheClean );

    // 75.185.76.245 - - [01/Sep/2007:00:01:03 +0000] "POST /mt-tb.cgi/235 HTTP/1.1" 403 174 "-" "Opera/9.10 (Windows NT 5.1; U; ru)" "-"

    DateType dateType = new DateType( TestConstants.APACHE_DATE_FORMAT );

    Type[] lhsTypes = new Type[]{
      String.class, // ip
      String.class, // -
      String.class, // -
View Full Code Here


    {
    final SimpleDateFormat dateFormat = new SimpleDateFormat( "dd/MMM/yyyy:HH:mm:ss:SSS Z" );
    Date date = new Date();
    String stringDate = dateFormat.format( date );

    CoercibleType coercible = new DateType( "dd/MMM/yyyy:HH:mm:ss:SSS Z", TimeZone.getDefault() );

    Fields fields = Fields.size( 2 ).applyTypes( coercible, long.class );
    Tuple tuple = new Tuple( date.getTime(), date.getTime() );

    TupleEntry results = new TupleEntry( fields, tuple );
View Full Code Here

    {
    final SimpleDateFormat dateFormat = new SimpleDateFormat( "dd/MMM/yyyy:HH:mm:ss:SSS Z" );
    Date date = new Date();
    String stringDate = dateFormat.format( date );

    CoercibleType coercible = new DateType( "dd/MMM/yyyy:HH:mm:ss:SSS Z", TimeZone.getDefault() );

    Fields fields = Fields.size( 5 ).applyTypes( coercible, coercible, coercible, coercible, long.class );
    Tuple tuple = Tuple.size( 5 );

    TupleEntry results = new TupleEntry( fields, tuple );
View Full Code Here

  @Test
  public void testCoerceIterable()
    {
    final SimpleDateFormat dateFormat = new SimpleDateFormat( "dd/MMM/yyyy:HH:mm:ss:SSS Z" );

    CoercibleType coercible = new DateType( "dd/MMM/yyyy:HH:mm:ss:SSS Z", TimeZone.getDefault() );

    Date date = new Date();
    String stringDate = dateFormat.format( date );
    Tuple tuple = Tuple.size( 4 );
View Full Code Here

  @Test
  public void testFieldCoercion() throws IOException
    {
    // 75.185.76.245 - - [01/Sep/2007:00:01:03 +0000] "POST /mt-tb.cgi/235 HTTP/1.1" 403 174 "-" "Opera/9.10 (Windows NT 5.1; U; ru)" "-"

    DateType dateType = new DateType( TestConstants.APACHE_DATE_FORMAT );

    Type[] types = new Type[]{
      String.class, // ip
      String.class, // -
      String.class, // -
View Full Code Here

TOP

Related Classes of cascading.tuple.type.DateType

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.