public static CouchbaseOperation getOperation ( Configuration hadoopConfiguration ) throws ArgsException { String strCouchbaseOperation = hadoopConfiguration . get ( ARG_OPERATION . getPropertyName ( ) ) ; // Default value if ( strCouchbaseOperation == null ) { return CouchbaseOperation . SET ; } try { return CouchbaseOperation . valueOf ( strCouchbaseOperation ) ; } catch ( IllegalArgumentException e ) { throw new ArgsException ( "Unrecognized store type '" + strCouchbaseOperation + "'. Please provide one of the following: SET, ADD, REPLACE, APPEND, PREPEND and DELETE." , e ) ; } }
Reads Couchbase store operation from the Hadoop configuration type .