Package cascading

Examples of cascading.CascadingException


      throws IOException, CascadingException {
    String inputPath = manageTemporaryPath(path);

    File inputFile = new File(inputPath);
    if (inputFile.exists()) {
      throw new CascadingException("Input file " + inputPath + " already exists.");
    }
    Tap inputTap = new Hfs(new SequenceFile(fields), inputPath, SinkMode.REPLACE);
    TupleEntryCollector collector = inputTap.openForWrite(getJobConf());
    return collector;
  }
View Full Code Here


   */
  private Serializer<?> getNewSerializer(Class<?> type ) {
    try {
      return mFactory.getSerializer(type);
    } catch( NullPointerException exception ) {
      throw new CascadingException("Unable to load serializer for: " + type.getName()
          + " from: " + mFactory.getClass().getName() );
    }
  }
View Full Code Here

   */
  private Deserializer<?> getNewDeserializer(Class<?> type ) {
    try {
      return mFactory.getDeserializer(type);
    } catch( NullPointerException exception ) {
      throw new CascadingException("Unable to load deserializer for: " + type.getName()
          + " from: " + mFactory.getClass().getName() );
    }
  }
View Full Code Here

  /**
   * Validates that the number of classes passed in matches the number of fields.
   */
  private void validateClasses(Fields valueFields, Class<?>[] valueClasses) {
    if (valueClasses.length != valueFields.size()) {
      throw new CascadingException("Expected same number of classes and value fields for "
          + "SerializingHBaseScheme. "
          + "Got: " + valueClasses.length + " classes, and " + valueFields.size() + " fields.");
    }
  }
View Full Code Here

      return invokeStaticMethod( type, methodName, parameters, parameterTypes );
      }
    catch( ClassNotFoundException exception )
      {
      throw new CascadingException( "unable to load class: " + typeString, exception );
      }
    }
View Full Code Here

      return method.invoke( null, parameters );
      }
    catch( Exception exception )
      {
      throw new CascadingException( "unable to invoke static method: " + type.getName() + "." + methodName, exception );
      }
    }
View Full Code Here

      return (T) field.get( null );
      }
    catch( Exception exception )
      {
      throw new CascadingException( "unable to get static field: " + type.getName() + "." + fieldName, exception );
      }
    }
View Full Code Here

      return (T) method.invoke( target, parameters );
      }
    catch( Exception exception )
      {
      throw new CascadingException( "unable to invoke instance method: " + target.getClass().getName() + "." + methodName, exception );
      }
    }
View Full Code Here

      return ReflectionUtils.newInstance( type, jobConf );
      }
    catch( ClassNotFoundException exception )
      {
      throw new CascadingException( "unable to load class: " + typeName, exception );
      }
    }
View Full Code Here

        if( tokenAnnotation == null )
          continue;

        if( tokenAnnotation.tokens().length != tokenAnnotation.classNames().length )
          throw new CascadingException( "serialization annotation tokens and classNames must be the same length" );

        int[] tokens = tokenAnnotation.tokens();

        for( int i = 0; i < tokens.length; i++ )
          addToken( type, tokens[ i ], tokenAnnotation.classNames()[ i ] );
View Full Code Here

TOP

Related Classes of cascading.CascadingException

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.