Package org.apache.sqoop.schema.type

Examples of org.apache.sqoop.schema.type.Text


        break;
      case SET:
        output = new Set(key);
        break;
      case TEXT:
        output = new Text().setSize(size);
        break;
      case TIME:
        output = new Time().setFraction(fraction);
        break;
      case UNSUPPORTED:
View Full Code Here


   */
  public Schema getSchema(String name) {
    return new Schema(name)
      .addColumn(new FixedPoint("ICOL"))
      .addColumn(new FloatingPoint("DCOL"))
      .addColumn(new Text("VCOL"))
    ;
  }
View Full Code Here

      case Types.CHAR:
      case Types.LONGVARCHAR:
      case Types.NVARCHAR:
      case Types.NCHAR:
      case Types.LONGNVARCHAR:
        return new Text();

      case Types.DATE:
        return new Date();

      case Types.TIME:
View Full Code Here

    ConfigurationUtils.setHioSchema(job, null);
    assertNull(ConfigurationUtils.getHioSchema(jobConf));
  }

  private Schema getSchema(String name) {
    return new Schema(name).addColumn(new Text("c1"));
  }
View Full Code Here

    assertEquals(getSchema(), target);
  }

  private Schema getSchema() {
    return new Schema("schema")
      .addColumn(new Text("col1"))
      .addColumn(new Decimal("col2"))
    ;
  }
View Full Code Here

    transferAndAssert(decimal);
  }

  @Test
  public void testEnum() {
    Schema e = new Schema("e").addColumn(new Enum("e", new Text()));
    transferAndAssert(e);
  }
View Full Code Here

    transferAndAssert(fp);
  }

  @Test
  public void testMap() {
    Schema m = new Schema("m").addColumn(new Map("m", new Text(), new Decimal()));
    transferAndAssert(m);
  }
View Full Code Here

    transferAndAssert(s);
  }

  @Test
  public void testText() {
    Schema t = new Schema("t").addColumn(new Text("x", 10L));
    transferAndAssert(t);
  }
View Full Code Here

    Schema t = new Schema("t").addColumn(new Unsupported("u", 4L));
    transferAndAssert(t);
  }
  @Test
  public void testNullable() {
    Schema nullable = new Schema("n").addColumn(new Text("x", Boolean.FALSE));
    transferAndAssert(nullable);
  }
View Full Code Here

  }

  @Test
  public void testAllTypes() {
    Schema allTypes = new Schema("all-types")
      .addColumn(new Array("a", new Text()))
      .addColumn(new Binary("b"))
      .addColumn(new Bit("c"))
      .addColumn(new Date("d"))
      .addColumn(new DateTime("e"))
      .addColumn(new Decimal("f"))
      .addColumn(new Enum("g", new Text()))
      .addColumn(new FixedPoint("h"))
      .addColumn(new FloatingPoint("i"))
      .addColumn(new Map("j", new Text(), new Text()))
      .addColumn(new Set("k", new Text()))
      .addColumn(new Text("l"))
      .addColumn(new Time("m"))
      .addColumn(new Unsupported("u"))
    ;
    transferAndAssert(allTypes);
  }
View Full Code Here

TOP

Related Classes of org.apache.sqoop.schema.type.Text

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.