org.apache.hadoop.hbase.client
Enum Durability

java.lang.Object
  extended by java.lang.Enum<Durability>
      extended by org.apache.hadoop.hbase.client.Durability
All Implemented Interfaces:
Serializable, Comparable<Durability>

@InterfaceAudience.Public
@InterfaceStability.Evolving
public enum Durability
extends Enum<Durability>

Enum describing the durability guarantees for tables and Mutations Note that the items must be sorted in order of increasing durability


Enum Constant Summary
ASYNC_WAL
          Write the Mutation to the WAL asynchronously
FSYNC_WAL
          Write the Mutation to the WAL synchronously and force the entries to disk.
SKIP_WAL
          Do not write the Mutation to the WAL
SYNC_WAL
          Write the Mutation to the WAL synchronously.
USE_DEFAULT
          If this is for tables durability, use HBase's global default value (SYNC_WAL).
 
Method Summary
static Durability valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Durability[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

USE_DEFAULT

public static final Durability USE_DEFAULT
If this is for tables durability, use HBase's global default value (SYNC_WAL). Otherwise, if this is for mutation, use the table's default setting to determine durability. This must remain the first option.


SKIP_WAL

public static final Durability SKIP_WAL
Do not write the Mutation to the WAL


ASYNC_WAL

public static final Durability ASYNC_WAL
Write the Mutation to the WAL asynchronously


SYNC_WAL

public static final Durability SYNC_WAL
Write the Mutation to the WAL synchronously. The data is flushed to the filesystem implementation, but not necessarily to disk. For HDFS this will flush the data to the designated number of DataNodes. See HADOOP-6313


FSYNC_WAL

public static final Durability FSYNC_WAL
Write the Mutation to the WAL synchronously and force the entries to disk. (Note: this is currently not supported and will behave identical to SYNC_WAL) See HADOOP-6313

Method Detail

values

public static Durability[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Durability c : Durability.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Durability valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.