1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 package org.apache.hadoop.hbase.client; 20 21 import org.apache.hadoop.hbase.classification.InterfaceAudience; 22 import org.apache.hadoop.hbase.classification.InterfaceStability; 23 24 /** 25 * Enum describing the durability guarantees for tables and {@link Mutation}s 26 * Note that the items must be sorted in order of increasing durability 27 */ 28 @InterfaceAudience.Public 29 @InterfaceStability.Evolving 30 public enum Durability { 31 /* Developer note: Do not rename the enum field names. They are serialized in HTableDescriptor */ 32 /** 33 * If this is for tables durability, use HBase's global default value (SYNC_WAL). 34 * Otherwise, if this is for mutation, use the table's default setting to determine durability. 35 * This must remain the first option. 36 */ 37 USE_DEFAULT, 38 /** 39 * Do not write the Mutation to the WAL 40 */ 41 SKIP_WAL, 42 /** 43 * Write the Mutation to the WAL asynchronously 44 */ 45 ASYNC_WAL, 46 /** 47 * Write the Mutation to the WAL synchronously. 48 * The data is flushed to the filesystem implementation, but not necessarily to disk. 49 * For HDFS this will flush the data to the designated number of DataNodes. 50 * See <a href="https://issues.apache.org/jira/browse/HADOOP-6313">HADOOP-6313</a> 51 */ 52 SYNC_WAL, 53 /** 54 * Write the Mutation to the WAL synchronously and force the entries to disk. 55 * (Note: this is currently not supported and will behave identical to {@link #SYNC_WAL}) 56 * See <a href="https://issues.apache.org/jira/browse/HADOOP-6313">HADOOP-6313</a> 57 */ 58 FSYNC_WAL 59 }