Package org.apache.hadoop.io

Examples of org.apache.hadoop.io.VersionMismatchException


        throw new IOException(file + " not a SequenceFile");

      // Set 'version'
      version = versionBlock[3];
      if (version > VERSION[3])
        throw new VersionMismatchException(VERSION[3], version);

      if (version < BLOCK_COMPRESS_VERSION) {
        UTF8 className = new UTF8();

        className.readFields(in);
View Full Code Here


        }

        // Set 'version'
        version = in.readByte();
        if (version > CURRENT_VERSION) {
          throw new VersionMismatchException((byte) CURRENT_VERSION, version);
        }
      }

      if (version == ORIGINAL_VERSION) {
        try {
View Full Code Here

      contentType = Text.readString(in); // read contentType
      metadata.readFields(in); // read meta data
      break;
    default:
      throw new VersionMismatchException(VERSION, version);
    }

  }
View Full Code Here

        throw new IOException(file + " not a MySequenceFile");
     
      // Set 'version'
      version = versionBlock[3];
      if (version > VERSION[3])
        throw new VersionMismatchException(VERSION[3], version);
     
      if (version < BLOCK_COMPRESS_VERSION) {
        Text className = new Text();
       
        className.readFields(in);
View Full Code Here

      }

      // Set 'version'
      version = versionBlock[3];
      if (version > VERSION[3]) {
        throw new VersionMismatchException(VERSION[3], version);
      }

      try {
        Class<?> keyCls = conf.getClassByName(Text.readString(in));
        Class<?> valCls = conf.getClassByName(Text.readString(in));
View Full Code Here

  public void readFields(DataInput in) throws IOException {
    fields.clear();
    byte version = in.readByte();
    if (version != VERSION) {
      throw new VersionMismatchException(VERSION, version);
    }
    int size = WritableUtils.readVInt(in);
    for (int i = 0; i < size; i++) {
      String name = Text.readString(in);
      NutchField field = new NutchField();
View Full Code Here

        }

        // Set 'version'
        version = sin.readByte();
        if (version > CURRENT_VERSION) {
          throw new VersionMismatchException((byte) CURRENT_VERSION, version);
        }
      }

      if (version == ORIGINAL_VERSION) {
        try {
View Full Code Here

      contentType = Text.readString(in); // read contentType
      metadata.readFields(in); // read meta data
      break;
    default:
      throw new VersionMismatchException(VERSION, version);
    }

  }
View Full Code Here

        throw new IOException(file + " not a RCFile");

      // Set 'version'
      version = versionBlock[3];
      if (version > VERSION[3])
        throw new VersionMismatchException(VERSION[3], version);

      try {
        Class<?> keyCls = conf.getClassByName(Text.readString(in));
        Class<?> valCls = conf.getClassByName(Text.readString(in));
        if (!keyCls.equals(KeyBuffer.class)
View Full Code Here

      code = in.readByte();
      lastModified = in.readLong();
      args = WritableUtils.readStringArray(in);
      break;
    default:
      throw new VersionMismatchException(VERSION, version);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.io.VersionMismatchException

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.