Package eu.stratosphere.core.fs

Examples of eu.stratosphere.core.fs.FileInputSplit


 
  @Test
  public void testReadAll() throws IOException {
    try {
      final String fileContent = "111|222|333|444|555\n666|777|888|999|000|";
      final FileInputSplit split = createTempFile(fileContent)
   
      final Configuration parameters = new Configuration();
     
      new CsvInputFormat.ConfigBuilder(null, parameters)
        .fieldDelimiter('|')
View Full Code Here


 
  @Test
  public void testReadFirstN() throws IOException {
    try {
      final String fileContent = "111|222|333|444|555|\n666|777|888|999|000|";
      final FileInputSplit split = createTempFile(fileContent)
   
      final Configuration parameters = new Configuration();
     
      new CsvInputFormat.ConfigBuilder(null, parameters)
      .fieldDelimiter('|')
View Full Code Here

 
  @Test
  public void testReadSparse() throws IOException {
    try {
      final String fileContent = "111|222|333|444|555|666|777|888|999|000|\n000|999|888|777|666|555|444|333|222|111|";
      final FileInputSplit split = createTempFile(fileContent)
   
      final Configuration parameters = new Configuration();
     
      new CsvInputFormat.ConfigBuilder(null, parameters)
        .fieldDelimiter('|')
View Full Code Here

 
  @Test
  public void testReadSparseShufflePosition() throws IOException {
    try {
      final String fileContent = "111|222|333|444|555|666|777|888|999|000|\n000|999|888|777|666|555|444|333|222|111|";
      final FileInputSplit split = createTempFile(fileContent)
   
      final Configuration parameters = new Configuration();
     
      new CsvInputFormat.ConfigBuilder(null, parameters)
        .fieldDelimiter('|')
View Full Code Here

   
    DataOutputStream dos = new DataOutputStream(new FileOutputStream(tempFile));
    dos.writeBytes(content);
    dos.close();
     
    return new FileInputSplit(0, new Path(this.tempFile.toURI().toString()), 0, this.tempFile.length(), new String[] {"localhost"});
  }
View Full Code Here

 
  @Test
  public void testReadNoPosAll() throws IOException {
    try {
      final String fileContent = "111|222|333|444|555\n666|777|888|999|000|";
      final FileInputSplit split = createTempFile(fileContent)
   
      final Configuration parameters = new Configuration();
     
      format.setFieldDelimiter('|');
      format.setFieldTypesGeneric(IntValue.class, IntValue.class, IntValue.class, IntValue.class, IntValue.class);
View Full Code Here

 
  @Test
  public void testReadNoPosFirstN() throws IOException {
    try {
      final String fileContent = "111|222|333|444|555|\n666|777|888|999|000|";
      final FileInputSplit split = createTempFile(fileContent)
   
      final Configuration parameters = new Configuration();
     
      format.setFieldDelimiter('|');
      format.setFieldTypesGeneric(IntValue.class, IntValue.class);
View Full Code Here

 
  @Test
  public void testSparseParse() {
    try {
      final String fileContent = "111|222|333|444|555|666|777|888|999|000|\n000|999|888|777|666|555|444|333|222|111|";
      final FileInputSplit split = createTempFile(fileContent)
   
      final Configuration parameters = new Configuration();
     
      format.setFieldDelimiter('|');
      format.setFieldTypesGeneric(IntValue.class, null, null, IntValue.class, null, null, null, IntValue.class);
View Full Code Here

  @Test
  public void testLongLongLong() {
    try {
      final String fileContent = "1,2,3\n3,2,1";
      final FileInputSplit split = createTempFile(fileContent);

      final Configuration parameters = new Configuration();

      format.setFieldDelimiter(',');
      format.setFieldTypesGeneric(LongValue.class, LongValue.class, LongValue.class);
View Full Code Here

  @SuppressWarnings("unchecked")
  @Test
  public void testSparseParseWithIndices() {
    try {
      final String fileContent = "111|222|333|444|555|666|777|888|999|000|\n000|999|888|777|666|555|444|333|222|111|";
      final FileInputSplit split = createTempFile(fileContent);

      final Configuration parameters = new Configuration();

      format.setFieldDelimiter('|');
      format.setFieldsGeneric(new int[] { 0, 3, 7 },
View Full Code Here

TOP

Related Classes of eu.stratosphere.core.fs.FileInputSplit

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.