http://git-wip-us.apache.org/repos/asf/hbase-site/blob/7d38bdbb/devapidocs/org/apache/hadoop/hbase/util/CommonFSUtils.html
----------------------------------------------------------------------
diff --git a/devapidocs/org/apache/hadoop/hbase/util/CommonFSUtils.html
b/devapidocs/org/apache/hadoop/hbase/util/CommonFSUtils.html
new file mode 100644
index 0000000..5e3b8f3
--- /dev/null
+++ b/devapidocs/org/apache/hadoop/hbase/util/CommonFSUtils.html
@@ -0,0 +1,1435 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
+<!-- NewPage -->
+<html lang="en">
+<head>
+<!-- Generated by javadoc -->
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>CommonFSUtils (Apache HBase 3.0.0-SNAPSHOT API)</title>
+<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css"
title="Style">
+<script type="text/javascript" src="../../../../../script.js"></script>
+</head>
+<body>
+<script type="text/javascript"><!--
+ try {
+ if (location.href.indexOf('is-external=true') == -1) {
+ parent.document.title="CommonFSUtils (Apache HBase 3.0.0-SNAPSHOT
API)";
+ }
+ }
+ catch(err) {
+ }
+//-->
+var methods =
{"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9};
+var tabs = {65535:["t0","All Methods"],1:["t1","Static
Methods"],8:["t4","Concrete Methods"]};
+var altColor = "altColor";
+var rowColor = "rowColor";
+var tableTab = "tableTab";
+var activeTableTab = "activeTableTab";
+</script>
+<noscript>
+<div>JavaScript is disabled on your browser.</div>
+</noscript>
+<!-- ========= START OF TOP NAVBAR ======= -->
+<div class="topNav"><a name="navbar.top">
+<!-- -->
+</a>
+<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation
links">Skip navigation links</a></div>
+<a name="navbar.top.firstrow">
+<!-- -->
+</a>
+<ul class="navList" title="Navigation">
+<li><a href="../../../../../overview-summary.html">Overview</a></li>
+<li><a href="package-summary.html">Package</a></li>
+<li class="navBarCell1Rev">Class</li>
+<li><a href="class-use/CommonFSUtils.html">Use</a></li>
+<li><a href="package-tree.html">Tree</a></li>
+<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+<li><a href="../../../../../index-all.html">Index</a></li>
+<li><a href="../../../../../help-doc.html">Help</a></li>
+</ul>
+</div>
+<div class="subNav">
+<ul class="navList">
+<li><a
href="../../../../../org/apache/hadoop/hbase/util/CollectionUtils.IOExceptionSupplier.html"
title="interface in org.apache.hadoop.hbase.util"><span
class="typeNameLink">Prev Class</span></a></li>
+<li><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.StreamCapabilities.html"
title="class in org.apache.hadoop.hbase.util"><span
class="typeNameLink">Next Class</span></a></li>
+</ul>
+<ul class="navList">
+<li><a
href="../../../../../index.html?org/apache/hadoop/hbase/util/CommonFSUtils.html"
target="_top">Frames</a></li>
+<li><a href="CommonFSUtils.html" target="_top">No Frames</a></li>
+</ul>
+<ul class="navList" id="allclasses_navbar_top">
+<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
+</ul>
+<div>
+<script type="text/javascript"><!--
+ allClassesLink = document.getElementById("allclasses_navbar_top");
+ if(window==top) {
+ allClassesLink.style.display = "block";
+ }
+ else {
+ allClassesLink.style.display = "none";
+ }
+ //-->
+</script>
+</div>
+<div>
+<ul class="subNavList">
+<li>Summary: </li>
+<li><a href="#nested.class.summary">Nested</a> | </li>
+<li><a href="#field.summary">Field</a> | </li>
+<li><a href="#constructor.summary">Constr</a> | </li>
+<li><a href="#method.summary">Method</a></li>
+</ul>
+<ul class="subNavList">
+<li>Detail: </li>
+<li><a href="#field.detail">Field</a> | </li>
+<li><a href="#constructor.detail">Constr</a> | </li>
+<li><a href="#method.detail">Method</a></li>
+</ul>
+</div>
+<a name="skip.navbar.top">
+<!-- -->
+</a></div>
+<!-- ========= END OF TOP NAVBAR ========= -->
+<!-- ======== START OF CLASS DATA ======== -->
+<div class="header">
+<div class="subTitle">org.apache.hadoop.hbase.util</div>
+<h2 title="Class CommonFSUtils" class="title">Class CommonFSUtils</h2>
+</div>
+<div class="contentContainer">
+<ul class="inheritance">
+<li><a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true"
title="class or interface in java.lang">java.lang.Object</a></li>
+<li>
+<ul class="inheritance">
+<li>org.apache.hadoop.hbase.util.CommonFSUtils</li>
+</ul>
+</li>
+</ul>
+<div class="description">
+<ul class="blockList">
+<li class="blockList">
+<dl>
+<dt>Direct Known Subclasses:</dt>
+<dd><a href="../../../../../org/apache/hadoop/hbase/util/FSUtils.html"
title="class in org.apache.hadoop.hbase.util">FSUtils</a></dd>
+</dl>
+<hr>
+<br>
+<pre>@InterfaceAudience.Private
+public abstract class <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.59">CommonFSUtils</a>
+extends <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true"
title="class or interface in java.lang">Object</a></pre>
+<div class="block">Utility methods for interacting with the underlying file
system.</div>
+</li>
+</ul>
+</div>
+<div class="summary">
+<ul class="blockList">
+<li class="blockList">
+<!-- ======== NESTED CLASS SUMMARY ======== -->
+<ul class="blockList">
+<li class="blockList"><a name="nested.class.summary">
+<!-- -->
+</a>
+<h3>Nested Class Summary</h3>
+<table class="memberSummary" border="0" cellpadding="3" cellspacing="0"
summary="Nested Class Summary table, listing nested classes, and an
explanation">
+<caption><span>Nested Classes</span><span
class="tabEnd"> </span></caption>
+<tr>
+<th class="colFirst" scope="col">Modifier and Type</th>
+<th class="colLast" scope="col">Class and Description</th>
+</tr>
+<tr class="altColor">
+<td class="colFirst"><code>private static class </code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.StreamCapabilities.html"
title="class in
org.apache.hadoop.hbase.util">CommonFSUtils.StreamCapabilities</a></span></code> </td>
+</tr>
+<tr class="rowColor">
+<td class="colFirst"><code>static class </code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.StreamLacksCapabilityException.html"
title="class in
org.apache.hadoop.hbase.util">CommonFSUtils.StreamLacksCapabilityException</a></span></code>
+<div class="block">Helper exception for those cases where the place where we
need to check a stream capability
+ is not where we have the needed context to explain the impact and mitigation
for a lack.</div>
+</td>
+</tr>
+</table>
+</li>
+</ul>
+<!-- =========== FIELD SUMMARY =========== -->
+<ul class="blockList">
+<li class="blockList"><a name="field.summary">
+<!-- -->
+</a>
+<h3>Field Summary</h3>
+<table class="memberSummary" border="0" cellpadding="3" cellspacing="0"
summary="Field Summary table, listing fields, and an explanation">
+<caption><span>Fields</span><span class="tabEnd"> </span></caption>
+<tr>
+<th class="colFirst" scope="col">Modifier and Type</th>
+<th class="colLast" scope="col">Field and Description</th>
+</tr>
+<tr class="altColor">
+<td class="colFirst"><code>static <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a></code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#FULL_RWX_PERMISSIONS">FULL_RWX_PERMISSIONS</a></span></code>
+<div class="block">Full access permissions (starting point for a umask)</div>
+</td>
+</tr>
+<tr class="rowColor">
+<td class="colFirst"><code>static <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a></code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#HBASE_WAL_DIR">HBASE_WAL_DIR</a></span></code>
+<div class="block">Parameter name for HBase WAL directory</div>
+</td>
+</tr>
+<tr class="altColor">
+<td class="colFirst"><code>private static
org.apache.commons.logging.Log</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#LOG">LOG</a></span></code> </td>
+</tr>
+<tr class="rowColor">
+<td class="colFirst"><code>private static <a
href="http://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true"
title="class or interface in
java.util">Map</a><org.apache.hadoop.fs.FileSystem,<a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true"
title="class or interface in java.lang">Boolean</a>></code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#warningMap">warningMap</a></span></code> </td>
+</tr>
+</table>
+</li>
+</ul>
+<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+<ul class="blockList">
+<li class="blockList"><a name="constructor.summary">
+<!-- -->
+</a>
+<h3>Constructor Summary</h3>
+<table class="memberSummary" border="0" cellpadding="3" cellspacing="0"
summary="Constructor Summary table, listing constructors, and an explanation">
+<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
+<tr>
+<th class="colFirst" scope="col">Modifier</th>
+<th class="colLast" scope="col">Constructor and Description</th>
+</tr>
+<tr class="altColor">
+<td class="colFirst"><code>protected </code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#CommonFSUtils--">CommonFSUtils</a></span>()</code> </td>
+</tr>
+</table>
+</li>
+</ul>
+<!-- ========== METHOD SUMMARY =========== -->
+<ul class="blockList">
+<li class="blockList"><a name="method.summary">
+<!-- -->
+</a>
+<h3>Method Summary</h3>
+<table class="memberSummary" border="0" cellpadding="3" cellspacing="0"
summary="Method Summary table, listing methods, and an explanation">
+<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span
class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a
href="javascript:show(1);">Static Methods</a></span><span
class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a
href="javascript:show(8);">Concrete Methods</a></span><span
class="tabEnd"> </span></span></caption>
+<tr>
+<th class="colFirst" scope="col">Modifier and Type</th>
+<th class="colLast" scope="col">Method and Description</th>
+</tr>
+<tr id="i0" class="altColor">
+<td class="colFirst"><code>static void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#checkShortCircuitReadBufferSize-org.apache.hadoop.conf.Configuration-">checkShortCircuitReadBufferSize</a></span>(org.apache.hadoop.conf.Configuration conf)</code>
+<div class="block">Check if short circuit read buffer size is set and if not,
set it to hbase value.</div>
+</td>
+</tr>
+<tr id="i1" class="rowColor">
+<td class="colFirst"><code>static
org.apache.hadoop.fs.FSDataOutputStream</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#create-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.permission.FsPermission-boolean-">create</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path path,
+ org.apache.hadoop.fs.permission.FsPermission perm,
+ boolean overwrite)</code>
+<div class="block">Create the specified file on the filesystem.</div>
+</td>
+</tr>
+<tr id="i2" class="altColor">
+<td class="colFirst"><code>static boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#delete-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-boolean-">delete</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path path,
+ boolean recursive)</code>
+<div class="block">Calls fs.delete() and returns the value returned by the
fs.delete()</div>
+</td>
+</tr>
+<tr id="i3" class="rowColor">
+<td class="colFirst"><code>static boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#deleteDirectory-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">deleteDirectory</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path dir)</code>
+<div class="block">Delete if exists.</div>
+</td>
+</tr>
+<tr id="i4" class="altColor">
+<td class="colFirst"><code>static org.apache.hadoop.fs.FileSystem</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#getCurrentFileSystem-org.apache.hadoop.conf.Configuration-">getCurrentFileSystem</a></span>(org.apache.hadoop.conf.Configuration conf)</code> </td>
+</tr>
+<tr id="i5" class="rowColor">
+<td class="colFirst"><code>static long</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#getDefaultBlockSize-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">getDefaultBlockSize</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path path)</code>
+<div class="block">Return the number of bytes that large input files should be
optimally
+ be split into to minimize i/o time.</div>
+</td>
+</tr>
+<tr id="i6" class="altColor">
+<td class="colFirst"><code>static int</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#getDefaultBufferSize-org.apache.hadoop.fs.FileSystem-">getDefaultBufferSize</a></span>(org.apache.hadoop.fs.FileSystem fs)</code>
+<div class="block">Returns the default buffer size to use during writes.</div>
+</td>
+</tr>
+<tr id="i7" class="rowColor">
+<td class="colFirst"><code>static short</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#getDefaultReplication-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">getDefaultReplication</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path path)</code> </td>
+</tr>
+<tr id="i8" class="altColor">
+<td class="colFirst"><code>static
org.apache.hadoop.fs.permission.FsPermission</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#getFilePermissions-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.conf.Configuration-java.lang.String-">getFilePermissions</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.conf.Configuration conf,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in
java.lang">String</a> permssionConfKey)</code>
+<div class="block">Get the file permissions specified in the configuration, if
they are
+ enabled.</div>
+</td>
+</tr>
+<tr id="i9" class="rowColor">
+<td class="colFirst"><code>static org.apache.hadoop.fs.Path</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#getNamespaceDir-org.apache.hadoop.fs.Path-java.lang.String-">getNamespaceDir</a></span>(org.apache.hadoop.fs.Path rootdir,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> namespace)</code>
+<div class="block">Returns the <code>Path</code> object representing
+ the namespace directory under path rootdir</div>
+</td>
+</tr>
+<tr id="i10" class="altColor">
+<td class="colFirst"><code>static <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a></code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#getPath-org.apache.hadoop.fs.Path-">getPath</a></span>(org.apache.hadoop.fs.Path p)</code>
+<div class="block">Return the 'path' component of a Path.</div>
+</td>
+</tr>
+<tr id="i11" class="rowColor">
+<td class="colFirst"><code>static org.apache.hadoop.fs.Path</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#getRootDir-org.apache.hadoop.conf.Configuration-">getRootDir</a></span>(org.apache.hadoop.conf.Configuration c)</code> </td>
+</tr>
+<tr id="i12" class="altColor">
+<td class="colFirst"><code>static org.apache.hadoop.fs.FileSystem</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#getRootDirFileSystem-org.apache.hadoop.conf.Configuration-">getRootDirFileSystem</a></span>(org.apache.hadoop.conf.Configuration c)</code> </td>
+</tr>
+<tr id="i13" class="rowColor">
+<td class="colFirst"><code>static org.apache.hadoop.fs.Path</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#getTableDir-org.apache.hadoop.fs.Path-org.apache.hadoop.hbase.TableName-">getTableDir</a></span>(org.apache.hadoop.fs.Path rootdir,
+ <a href="../../../../../org/apache/hadoop/hbase/TableName.html"
title="class in org.apache.hadoop.hbase">TableName</a> tableName)</code>
+<div class="block">Returns the <code>Path</code> object representing the table
directory under
+ path rootdir</div>
+</td>
+</tr>
+<tr id="i14" class="altColor">
+<td class="colFirst"><code>static <a
href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in
org.apache.hadoop.hbase">TableName</a></code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#getTableName-org.apache.hadoop.fs.Path-">getTableName</a></span>(org.apache.hadoop.fs.Path tablePath)</code>
+<div class="block">Returns the <a
href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in
org.apache.hadoop.hbase"><code>TableName</code></a> object representing
+ the table directory under
+ path rootdir</div>
+</td>
+</tr>
+<tr id="i15" class="rowColor">
+<td class="colFirst"><code>static org.apache.hadoop.fs.FileSystem</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#getWALFileSystem-org.apache.hadoop.conf.Configuration-">getWALFileSystem</a></span>(org.apache.hadoop.conf.Configuration c)</code> </td>
+</tr>
+<tr id="i16" class="altColor">
+<td class="colFirst"><code>static org.apache.hadoop.fs.Path</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#getWALRootDir-org.apache.hadoop.conf.Configuration-">getWALRootDir</a></span>(org.apache.hadoop.conf.Configuration c)</code> </td>
+</tr>
+<tr id="i17" class="rowColor">
+<td class="colFirst"><code>static boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#hasCapability-org.apache.hadoop.fs.FSDataOutputStream-java.lang.String-">hasCapability</a></span>(org.apache.hadoop.fs.FSDataOutputStream stream,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> capability)</code>
+<div class="block">If our FileSystem version includes the StreamCapabilities
class, check if
+ the given stream has a particular capability.</div>
+</td>
+</tr>
+<tr id="i18" class="altColor">
+<td class="colFirst"><code>private static void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#invokeSetStoragePolicy-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-java.lang.String-">invokeSetStoragePolicy</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path path,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in
java.lang">String</a> storagePolicy)</code> </td>
+</tr>
+<tr id="i19" class="rowColor">
+<td class="colFirst"><code>static boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#isExists-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">isExists</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path path)</code>
+<div class="block">Calls fs.exists().</div>
+</td>
+</tr>
+<tr id="i20" class="altColor">
+<td class="colFirst"><code>static boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#isHDFS-org.apache.hadoop.conf.Configuration-">isHDFS</a></span>(org.apache.hadoop.conf.Configuration conf)</code> </td>
+</tr>
+<tr id="i21" class="rowColor">
+<td class="colFirst"><code>static boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#isMatchingTail-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.Path-">isMatchingTail</a></span>(org.apache.hadoop.fs.Path pathToSearch,
+ org.apache.hadoop.fs.Path pathTail)</code>
+<div class="block">Compare path component of the Path URI; e.g.</div>
+</td>
+</tr>
+<tr id="i22" class="altColor">
+<td class="colFirst"><code>static boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#isMatchingTail-org.apache.hadoop.fs.Path-java.lang.String-">isMatchingTail</a></span>(org.apache.hadoop.fs.Path pathToSearch,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> pathTail)</code>
+<div class="block">Compare path component of the Path URI; e.g.</div>
+</td>
+</tr>
+<tr id="i23" class="rowColor">
+<td class="colFirst"><code>static boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#isRecoveredEdits-org.apache.hadoop.fs.Path-">isRecoveredEdits</a></span>(org.apache.hadoop.fs.Path path)</code>
+<div class="block">Checks if the given path is the one with 'recovered.edits'
dir.</div>
+</td>
+</tr>
+<tr id="i24" class="altColor">
+<td class="colFirst"><code>static boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#isStartingWithPath-org.apache.hadoop.fs.Path-java.lang.String-">isStartingWithPath</a></span>(org.apache.hadoop.fs.Path rootPath,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> path)</code>
+<div class="block">Compare of path component.</div>
+</td>
+</tr>
+<tr id="i25" class="rowColor">
+<td class="colFirst"><code>private static boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#isValidWALRootDir-org.apache.hadoop.fs.Path-org.apache.hadoop.conf.Configuration-">isValidWALRootDir</a></span>(org.apache.hadoop.fs.Path walDir,
+ org.apache.hadoop.conf.Configuration c)</code> </td>
+</tr>
+<tr id="i26" class="altColor">
+<td class="colFirst"><code>static <a
href="http://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true"
title="class or interface in
java.util">List</a><org.apache.hadoop.fs.LocatedFileStatus></code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#listLocatedStatus-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">listLocatedStatus</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path dir)</code>
+<div class="block">Calls fs.listFiles() to get FileStatus and BlockLocations
together for reducing rpc call</div>
+</td>
+</tr>
+<tr id="i27" class="rowColor">
+<td class="colFirst"><code>static org.apache.hadoop.fs.FileStatus[]</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#listStatus-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">listStatus</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path dir)</code>
+<div class="block">Calls fs.listStatus() and treats FileNotFoundException as
non-fatal
+ This would accommodates differences between hadoop versions</div>
+</td>
+</tr>
+<tr id="i28" class="altColor">
+<td class="colFirst"><code>static org.apache.hadoop.fs.FileStatus[]</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#listStatus-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.PathFilter-">listStatus</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path dir,
+ org.apache.hadoop.fs.PathFilter filter)</code>
+<div class="block">Calls fs.listStatus() and treats FileNotFoundException as
non-fatal
+ This accommodates differences between hadoop versions, where hadoop 1
+ does not throw a FileNotFoundException, and return an empty FileStatus[]
+ while Hadoop 2 will throw FileNotFoundException.</div>
+</td>
+</tr>
+<tr id="i29" class="rowColor">
+<td class="colFirst"><code>static void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#logFileSystemState-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.commons.logging.Log-">logFileSystemState</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path root,
+ org.apache.commons.logging.Log LOG)</code>
+<div class="block">Log the current state of the filesystem from a certain root
directory</div>
+</td>
+</tr>
+<tr id="i30" class="altColor">
+<td class="colFirst"><code>private static void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#logFSTree-org.apache.commons.logging.Log-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-java.lang.String-">logFSTree</a></span>(org.apache.commons.logging.Log LOG,
+ org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path root,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> prefix)</code>
+<div class="block">Recursive helper to log the state of the FS</div>
+</td>
+</tr>
+<tr id="i31" class="rowColor">
+<td class="colFirst"><code>static <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a></code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#removeWALRootPath-org.apache.hadoop.fs.Path-org.apache.hadoop.conf.Configuration-">removeWALRootPath</a></span>(org.apache.hadoop.fs.Path path,
+ org.apache.hadoop.conf.Configuration conf)</code>
+<div class="block">Checks for the presence of the WAL log root path (using the
provided conf object) in the given
+ path.</div>
+</td>
+</tr>
+<tr id="i32" class="altColor">
+<td class="colFirst"><code>static boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#renameAndSetModifyTime-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.Path-">renameAndSetModifyTime</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path src,
+ org.apache.hadoop.fs.Path dest)</code> </td>
+</tr>
+<tr id="i33" class="rowColor">
+<td class="colFirst"><code>static void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#setFsDefault-org.apache.hadoop.conf.Configuration-org.apache.hadoop.fs.Path-">setFsDefault</a></span>(org.apache.hadoop.conf.Configuration c,
+ org.apache.hadoop.fs.Path root)</code> </td>
+</tr>
+<tr id="i34" class="altColor">
+<td class="colFirst"><code>static void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#setRootDir-org.apache.hadoop.conf.Configuration-org.apache.hadoop.fs.Path-">setRootDir</a></span>(org.apache.hadoop.conf.Configuration c,
+ org.apache.hadoop.fs.Path root)</code> </td>
+</tr>
+<tr id="i35" class="rowColor">
+<td class="colFirst"><code>static void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#setStoragePolicy-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.conf.Configuration-org.apache.hadoop.fs.Path-java.lang.String-java.lang.String-">setStoragePolicy</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.conf.Configuration conf,
+ org.apache.hadoop.fs.Path path,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> policyKey,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> defaultPolicy)</code>
+<div class="block">Sets storage policy for given path according to config
setting.</div>
+</td>
+</tr>
+<tr id="i36" class="altColor">
+<td class="colFirst"><code>static void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#setStoragePolicy-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-java.lang.String-">setStoragePolicy</a></span>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path path,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> storagePolicy)</code>
+<div class="block">Sets storage policy for given path.</div>
+</td>
+</tr>
+<tr id="i37" class="rowColor">
+<td class="colFirst"><code>static void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#setupShortCircuitRead-org.apache.hadoop.conf.Configuration-">setupShortCircuitRead</a></span>(org.apache.hadoop.conf.Configuration conf)</code>
+<div class="block">Do our short circuit read setup.</div>
+</td>
+</tr>
+<tr id="i38" class="altColor">
+<td class="colFirst"><code>static void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#setWALRootDir-org.apache.hadoop.conf.Configuration-org.apache.hadoop.fs.Path-">setWALRootDir</a></span>(org.apache.hadoop.conf.Configuration c,
+ org.apache.hadoop.fs.Path root)</code> </td>
+</tr>
+<tr id="i39" class="rowColor">
+<td class="colFirst"><code>static org.apache.hadoop.fs.Path</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#validateRootPath-org.apache.hadoop.fs.Path-">validateRootPath</a></span>(org.apache.hadoop.fs.Path root)</code>
+<div class="block">Verifies root directory path is a valid URI with a
scheme</div>
+</td>
+</tr>
+</table>
+<ul class="blockList">
+<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
+<!-- -->
+</a>
+<h3>Methods inherited from class java.lang.<a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true"
title="class or interface in java.lang">Object</a></h3>
+<code><a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--"
title="class or interface in java.lang">clone</a>, <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-"
title="class or interface in java.lang">equals</a>, <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--"
title="class or interface in java.lang">finalize</a>, <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--"
title="class or interface in java.lang">getClass</a>, <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--"
title="class or interface in java.lang">hashCode</a>, <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--"
title="class or interface in java.lang">notify</a>, <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang
/Object.html?is-external=true#notifyAll--" title="class or interface in
java.lang">notifyAll</a>, <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--"
title="class or interface in java.lang">toString</a>, <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--"
title="class or interface in java.lang">wait</a>, <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-"
title="class or interface in java.lang">wait</a>, <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-"
title="class or interface in java.lang">wait</a></code></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div class="details">
+<ul class="blockList">
+<li class="blockList">
+<!-- ============ FIELD DETAIL =========== -->
+<ul class="blockList">
+<li class="blockList"><a name="field.detail">
+<!-- -->
+</a>
+<h3>Field Detail</h3>
+<a name="LOG">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>LOG</h4>
+<pre>private static final org.apache.commons.logging.Log <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.60">LOG</a></pre>
+</li>
+</ul>
+<a name="HBASE_WAL_DIR">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>HBASE_WAL_DIR</h4>
+<pre>public static final <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.63">HBASE_WAL_DIR</a></pre>
+<div class="block">Parameter name for HBase WAL directory</div>
+<dl>
+<dt><span class="seeLabel">See Also:</span></dt>
+<dd><a
href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.CommonFSUtils.HBASE_WAL_DIR">Constant
Field Values</a></dd>
+</dl>
+</li>
+</ul>
+<a name="FULL_RWX_PERMISSIONS">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>FULL_RWX_PERMISSIONS</h4>
+<pre>public static final <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.66">FULL_RWX_PERMISSIONS</a></pre>
+<div class="block">Full access permissions (starting point for a umask)</div>
+<dl>
+<dt><span class="seeLabel">See Also:</span></dt>
+<dd><a
href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.CommonFSUtils.FULL_RWX_PERMISSIONS">Constant
Field Values</a></dd>
+</dl>
+</li>
+</ul>
+<a name="warningMap">
+<!-- -->
+</a>
+<ul class="blockListLast">
+<li class="blockList">
+<h4>warningMap</h4>
+<pre>private static final <a
href="http://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true"
title="class or interface in
java.util">Map</a><org.apache.hadoop.fs.FileSystem,<a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true"
title="class or interface in java.lang">Boolean</a>> <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.482">warningMap</a></pre>
+</li>
+</ul>
+</li>
+</ul>
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+<ul class="blockList">
+<li class="blockList"><a name="constructor.detail">
+<!-- -->
+</a>
+<h3>Constructor Detail</h3>
+<a name="CommonFSUtils--">
+<!-- -->
+</a>
+<ul class="blockListLast">
+<li class="blockList">
+<h4>CommonFSUtils</h4>
+<pre>protected <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.68">CommonFSUtils</a>()</pre>
+</li>
+</ul>
+</li>
+</ul>
+<!-- ============ METHOD DETAIL ========== -->
+<ul class="blockList">
+<li class="blockList"><a name="method.detail">
+<!-- -->
+</a>
+<h3>Method Detail</h3>
+<a name="isStartingWithPath-org.apache.hadoop.fs.Path-java.lang.String-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>isStartingWithPath</h4>
+<pre>public static boolean <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.80">isStartingWithPath</a>(org.apache.hadoop.fs.Path rootPath,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> path)</pre>
+<div class="block">Compare of path component. Does not consider schema; i.e.
if schemas
+ different but <code>path</code> starts with <code>rootPath</code>,
+ then the function returns true</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>rootPath</code> - value to check for</dd>
+<dd><code>path</code> - subject to check</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>True if <code>path</code> starts with <code>rootPath</code></dd>
+</dl>
+</li>
+</ul>
+<a name="isMatchingTail-org.apache.hadoop.fs.Path-java.lang.String-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>isMatchingTail</h4>
+<pre>public static boolean <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.94">isMatchingTail</a>(org.apache.hadoop.fs.Path pathToSearch,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> pathTail)</pre>
+<div class="block">Compare path component of the Path URI; e.g. if
hdfs://a/b/c and /a/b/c, it will compare the
+ '/a/b/c' part. Does not consider schema; i.e. if schemas different but path
or subpath matches,
+ the two will equate.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>pathToSearch</code> - Path we will be trying to match against.</dd>
+<dd><code>pathTail</code> - what to match</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>True if <code>pathTail</code> is tail on the path of
<code>pathToSearch</code></dd>
+</dl>
+</li>
+</ul>
+<a name="isMatchingTail-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>isMatchingTail</h4>
+<pre>public static boolean <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.106">isMatchingTail</a>(org.apache.hadoop.fs.Path pathToSearch,
+
org.apache.hadoop.fs.Path pathTail)</pre>
+<div class="block">Compare path component of the Path URI; e.g. if
hdfs://a/b/c and /a/b/c, it will compare the
+ '/a/b/c' part. If you passed in 'hdfs://a/b/c and b/c, it would return true.
Does not consider
+ schema; i.e. if schemas different but path or subpath matches, the two will
equate.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>pathToSearch</code> - Path we will be trying to match agains
against</dd>
+<dd><code>pathTail</code> - what to match</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>True if <code>pathTail</code> is tail on the path of
<code>pathToSearch</code></dd>
+</dl>
+</li>
+</ul>
+<a
name="deleteDirectory-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>deleteDirectory</h4>
+<pre>public static boolean <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.139">deleteDirectory</a>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path dir)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<div class="block">Delete if exists.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>fs</code> - filesystem object</dd>
+<dd><code>dir</code> - directory to delete</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>True if deleted <code>dir</code></dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code> - e</dd>
+</dl>
+</li>
+</ul>
+<a
name="getDefaultBlockSize-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getDefaultBlockSize</h4>
+<pre>public static long <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.155">getDefaultBlockSize</a>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path path)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<div class="block">Return the number of bytes that large input files should be
optimally
+ be split into to minimize i/o time.
+
+ use reflection to search for getDefaultBlockSize(Path f)
+ if the method doesn't exist, fall back to using getDefaultBlockSize()</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>fs</code> - filesystem object</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>the default block size for the path's filesystem</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code> - e</dd>
+</dl>
+</li>
+</ul>
+<a
name="getDefaultReplication-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getDefaultReplication</h4>
+<pre>public static short <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.189">getDefaultReplication</a>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path path)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<dl>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code></dd>
+</dl>
+</li>
+</ul>
+<a name="getDefaultBufferSize-org.apache.hadoop.fs.FileSystem-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getDefaultBufferSize</h4>
+<pre>public static int <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.223">getDefaultBufferSize</a>(org.apache.hadoop.fs.FileSystem fs)</pre>
+<div class="block">Returns the default buffer size to use during writes.
+
+ The size of the buffer should probably be a multiple of hardware
+ page size (4096 on Intel x86), and it determines how much data is
+ buffered during read and write operations.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>fs</code> - filesystem object</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>default buffer size to use during writes</dd>
+</dl>
+</li>
+</ul>
+<a
name="create-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.permission.FsPermission-boolean-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>create</h4>
+<pre>public static org.apache.hadoop.fs.FSDataOutputStream <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.244">create</a>(org.apache.hadoop.fs.FileSystem fs,
+
org.apache.hadoop.fs.Path path,
+
org.apache.hadoop.fs.permission.FsPermission perm,
+
boolean overwrite)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<div class="block">Create the specified file on the filesystem. By default,
this will:
+ <ol>
+ <li>apply the umask in the configuration (if it is enabled)</li>
+ <li>use the fs configured buffer size (or 4096 if not set)</li>
+ <li>use the default replication</li>
+ <li>use the default block size</li>
+ <li>not track progress</li>
+ </ol></div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>fs</code> - <code>FileSystem</code> on which to write the file</dd>
+<dd><code>path</code> - <code>Path</code> to the file to write</dd>
+<dd><code>perm</code> - intial permissions</dd>
+<dd><code>overwrite</code> - Whether or not the created file should be
overwritten.</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>output stream to the created file</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code> - if the file
cannot be created</dd>
+</dl>
+</li>
+</ul>
+<a
name="getFilePermissions-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.conf.Configuration-java.lang.String-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getFilePermissions</h4>
+<pre>public static org.apache.hadoop.fs.permission.FsPermission <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.266">getFilePermissions</a>(org.apache.hadoop.fs.FileSystem fs,
+
org.apache.hadoop.conf.Configuration conf,
+
<a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> permssionConfKey)</pre>
+<div class="block">Get the file permissions specified in the configuration, if
they are
+ enabled.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>fs</code> - filesystem that the file will be created on.</dd>
+<dd><code>conf</code> - configuration to read for determining if permissions
are
+ enabled and which to use</dd>
+<dd><code>permssionConfKey</code> - property key in the configuration to use
when
+ finding the permission</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>the permission to use when creating a new file on the fs. If
+ special permissions are not specified in the configuration, then
+ the default permissions on the the fs will be returned.</dd>
+</dl>
+</li>
+</ul>
+<a name="validateRootPath-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>validateRootPath</h4>
+<pre>public static org.apache.hadoop.fs.Path <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.300">validateRootPath</a>(org.apache.hadoop.fs.Path root)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<div class="block">Verifies root directory path is a valid URI with a
scheme</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>root</code> - root directory path</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>Passed <code>root</code> argument.</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code> - if not a valid
URI with a scheme</dd>
+</dl>
+</li>
+</ul>
+<a
name="removeWALRootPath-org.apache.hadoop.fs.Path-org.apache.hadoop.conf.Configuration-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>removeWALRootPath</h4>
+<pre>public static <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.325">removeWALRootPath</a>(org.apache.hadoop.fs.Path path,
+
org.apache.hadoop.conf.Configuration conf)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<div class="block">Checks for the presence of the WAL log root path (using the
provided conf object) in the given
+ path. If it exists, this method removes it and returns the String
representation of remaining
+ relative path.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>path</code> - must not be null</dd>
+<dd><code>conf</code> - must not be null</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>String representation of the remaining relative path</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code> - from underlying
filesystem</dd>
+</dl>
+</li>
+</ul>
+<a name="getPath-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getPath</h4>
+<pre>public static <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.346">getPath</a>(org.apache.hadoop.fs.Path p)</pre>
+<div class="block">Return the 'path' component of a Path. In Hadoop, Path is
an URI. This
+ method returns the 'path' component of a Path's URI: e.g. If a Path is
+ <code>hdfs://example.org:9000/hbase_trunk/TestTable/compaction.dir</code>,
+ this method returns <code>/hbase_trunk/TestTable/compaction.dir</code>.
+ This method is useful if you want to print out a Path without qualifying
+ Filesystem instance.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>p</code> - Filesystem Path whose 'path' component we are to
return.</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>Path portion of the Filesystem</dd>
+</dl>
+</li>
+</ul>
+<a name="getRootDir-org.apache.hadoop.conf.Configuration-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getRootDir</h4>
+<pre>public static org.apache.hadoop.fs.Path <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.356">getRootDir</a>(org.apache.hadoop.conf.Configuration c)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>c</code> - configuration</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd><code>Path</code> to hbase root directory from
+ configuration as a qualified Path.</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code> - e</dd>
+</dl>
+</li>
+</ul>
+<a
name="setRootDir-org.apache.hadoop.conf.Configuration-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>setRootDir</h4>
+<pre>public static void <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.362">setRootDir</a>(org.apache.hadoop.conf.Configuration c,
+ org.apache.hadoop.fs.Path root)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<dl>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code></dd>
+</dl>
+</li>
+</ul>
+<a
name="setFsDefault-org.apache.hadoop.conf.Configuration-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>setFsDefault</h4>
+<pre>public static void <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.366">setFsDefault</a>(org.apache.hadoop.conf.Configuration c,
+ org.apache.hadoop.fs.Path root)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<dl>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code></dd>
+</dl>
+</li>
+</ul>
+<a name="getRootDirFileSystem-org.apache.hadoop.conf.Configuration-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getRootDirFileSystem</h4>
+<pre>public static org.apache.hadoop.fs.FileSystem <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.370">getRootDirFileSystem</a>(org.apache.hadoop.conf.Configuration c)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<dl>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code></dd>
+</dl>
+</li>
+</ul>
+<a name="getWALRootDir-org.apache.hadoop.conf.Configuration-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getWALRootDir</h4>
+<pre>public static org.apache.hadoop.fs.Path <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.381">getWALRootDir</a>(org.apache.hadoop.conf.Configuration c)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>c</code> - configuration</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd><code>Path</code> to hbase log root directory: e.g. <a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#HBASE_WAL_DIR">"hbase.wal.dir"</a>
from
+ configuration as a qualified Path. Defaults to HBase root dir.</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code> - e</dd>
+</dl>
+</li>
+</ul>
+<a
name="setWALRootDir-org.apache.hadoop.conf.Configuration-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>setWALRootDir</h4>
+<pre>public static void <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.391">setWALRootDir</a>(org.apache.hadoop.conf.Configuration c,
+ org.apache.hadoop.fs.Path root)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<dl>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code></dd>
+</dl>
+</li>
+</ul>
+<a name="getWALFileSystem-org.apache.hadoop.conf.Configuration-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getWALFileSystem</h4>
+<pre>public static org.apache.hadoop.fs.FileSystem <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.395">getWALFileSystem</a>(org.apache.hadoop.conf.Configuration c)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<dl>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code></dd>
+</dl>
+</li>
+</ul>
+<a
name="isValidWALRootDir-org.apache.hadoop.fs.Path-org.apache.hadoop.conf.Configuration-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>isValidWALRootDir</h4>
+<pre>private static boolean <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.400">isValidWALRootDir</a>(org.apache.hadoop.fs.Path walDir,
+
org.apache.hadoop.conf.Configuration c)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<dl>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code></dd>
+</dl>
+</li>
+</ul>
+<a
name="getTableDir-org.apache.hadoop.fs.Path-org.apache.hadoop.hbase.TableName-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getTableDir</h4>
+<pre>public static org.apache.hadoop.fs.Path <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.419">getTableDir</a>(org.apache.hadoop.fs.Path rootdir,
+ <a
href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in
org.apache.hadoop.hbase">TableName</a> tableName)</pre>
+<div class="block">Returns the <code>Path</code> object representing the table
directory under
+ path rootdir</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>rootdir</code> - qualified path of HBase root directory</dd>
+<dd><code>tableName</code> - name of table</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd><code>Path</code> for table</dd>
+</dl>
+</li>
+</ul>
+<a name="getTableName-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getTableName</h4>
+<pre>public static <a
href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in
org.apache.hadoop.hbase">TableName</a> <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.432">getTableName</a>(org.apache.hadoop.fs.Path tablePath)</pre>
+<div class="block">Returns the <a
href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in
org.apache.hadoop.hbase"><code>TableName</code></a> object representing
+ the table directory under
+ path rootdir</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>tablePath</code> - path of table</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd><code>Path</code> for table</dd>
+</dl>
+</li>
+</ul>
+<a name="getNamespaceDir-org.apache.hadoop.fs.Path-java.lang.String-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getNamespaceDir</h4>
+<pre>public static org.apache.hadoop.fs.Path <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.444">getNamespaceDir</a>(org.apache.hadoop.fs.Path rootdir,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> namespace)</pre>
+<div class="block">Returns the <code>Path</code> object representing
+ the namespace directory under path rootdir</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>rootdir</code> - qualified path of HBase root directory</dd>
+<dd><code>namespace</code> - namespace name</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd><code>Path</code> for table</dd>
+</dl>
+</li>
+</ul>
+<a
name="setStoragePolicy-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.conf.Configuration-org.apache.hadoop.fs.Path-java.lang.String-java.lang.String-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>setStoragePolicy</h4>
+<pre>public static void <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.467">setStoragePolicy</a>(org.apache.hadoop.fs.FileSystem fs,
+
org.apache.hadoop.conf.Configuration conf,
+ org.apache.hadoop.fs.Path path,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> policyKey,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> defaultPolicy)</pre>
+<div class="block">Sets storage policy for given path according to config
setting.
+ If the passed path is a directory, we'll set the storage policy for all files
+ created in the future in said directory. Note that this change in storage
+ policy takes place at the FileSystem level; it will persist beyond this RS's
lifecycle.
+ If we're running on a FileSystem implementation that doesn't support the
given storage policy
+ (or storage policies at all), then we'll issue a log message and continue.
+
+ See
http://hadoop.apache.org/docs/r2.6.0/hadoop-project-dist/hadoop-hdfs/ArchivalStorage.html</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>fs</code> - We only do anything it implements a setStoragePolicy
method</dd>
+<dd><code>conf</code> - used to look up storage policy with given key; not
modified.</dd>
+<dd><code>path</code> - the Path whose storage policy is to be set</dd>
+<dd><code>policyKey</code> - Key to use pulling a policy from Configuration:
+ e.g. HConstants.WAL_STORAGE_POLICY (hbase.wal.storage.policy).</dd>
+<dd><code>defaultPolicy</code> - if the configured policy is equal to this
policy name, we will skip
+ telling the FileSystem to set a storage policy.</dd>
+</dl>
+</li>
+</ul>
+<a
name="setStoragePolicy-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-java.lang.String-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>setStoragePolicy</h4>
+<pre>public static void <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.501">setStoragePolicy</a>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path path,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> storagePolicy)</pre>
+<div class="block">Sets storage policy for given path.
+ If the passed path is a directory, we'll set the storage policy for all files
+ created in the future in said directory. Note that this change in storage
+ policy takes place at the FileSystem level; it will persist beyond this RS's
lifecycle.
+ If we're running on a version of FileSystem that doesn't support the given
storage policy
+ (or storage policies at all), then we'll issue a log message and continue.
+
+ See
http://hadoop.apache.org/docs/r2.6.0/hadoop-project-dist/hadoop-hdfs/ArchivalStorage.html</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>fs</code> - We only do anything it implements a setStoragePolicy
method</dd>
+<dd><code>path</code> - the Path whose storage policy is to be set</dd>
+<dd><code>storagePolicy</code> - Policy to set on <code>path</code>; see
hadoop 2.6+
+ org.apache.hadoop.hdfs.protocol.HdfsConstants for possible list e.g
+ 'COLD', 'WARM', 'HOT', 'ONE_SSD', 'ALL_SSD', 'LAZY_PERSIST'.</dd>
+</dl>
+</li>
+</ul>
+<a
name="invokeSetStoragePolicy-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-java.lang.String-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>invokeSetStoragePolicy</h4>
+<pre>private static void <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.522">invokeSetStoragePolicy</a>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path path,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> storagePolicy)</pre>
+</li>
+</ul>
+<a name="isHDFS-org.apache.hadoop.conf.Configuration-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>isHDFS</h4>
+<pre>public static boolean <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.605">isHDFS</a>(org.apache.hadoop.conf.Configuration conf)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>conf</code> - must not be null</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>True if this filesystem whose scheme is 'hdfs'.</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code> - from underlying
FileSystem</dd>
+</dl>
+</li>
+</ul>
+<a name="isRecoveredEdits-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>isRecoveredEdits</h4>
+<pre>public static boolean <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.616">isRecoveredEdits</a>(org.apache.hadoop.fs.Path path)</pre>
+<div class="block">Checks if the given path is the one with 'recovered.edits'
dir.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>path</code> - must not be null</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>True if we recovered edits</dd>
+</dl>
+</li>
+</ul>
+<a name="getCurrentFileSystem-org.apache.hadoop.conf.Configuration-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getCurrentFileSystem</h4>
+<pre>public static org.apache.hadoop.fs.FileSystem <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.625">getCurrentFileSystem</a>(org.apache.hadoop.conf.Configuration conf)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>conf</code> - must not be null</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>Returns the filesystem of the hbase rootdir.</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code> - from underlying
FileSystem</dd>
+</dl>
+</li>
+</ul>
+<a
name="listStatus-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.PathFilter-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>listStatus</h4>
+<pre>public static org.apache.hadoop.fs.FileStatus[] <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.644">listStatus</a>(org.apache.hadoop.fs.FileSystem fs,
+
org.apache.hadoop.fs.Path dir,
+
org.apache.hadoop.fs.PathFilter filter)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<div class="block">Calls fs.listStatus() and treats FileNotFoundException as
non-fatal
+ This accommodates differences between hadoop versions, where hadoop 1
+ does not throw a FileNotFoundException, and return an empty FileStatus[]
+ while Hadoop 2 will throw FileNotFoundException.
+
+ Where possible, prefer FSUtils#listStatusWithStatusFilter(FileSystem,
+ Path, FileStatusFilter) instead.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>fs</code> - file system</dd>
+<dd><code>dir</code> - directory</dd>
+<dd><code>filter</code> - path filter</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>null if dir is empty or doesn't exist, otherwise FileStatus array</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code></dd>
+</dl>
+</li>
+</ul>
+<a
name="listStatus-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>listStatus</h4>
+<pre>public static org.apache.hadoop.fs.FileStatus[] <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.669">listStatus</a>(org.apache.hadoop.fs.FileSystem fs,
+
org.apache.hadoop.fs.Path dir)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<div class="block">Calls fs.listStatus() and treats FileNotFoundException as
non-fatal
+ This would accommodates differences between hadoop versions</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>fs</code> - file system</dd>
+<dd><code>dir</code> - directory</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>null if dir is empty or doesn't exist, otherwise FileStatus array</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code></dd>
+</dl>
+</li>
+</ul>
+<a
name="listLocatedStatus-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>listLocatedStatus</h4>
+<pre>public static <a
href="http://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true"
title="class or interface in
java.util">List</a><org.apache.hadoop.fs.LocatedFileStatus> <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.680">listLocatedStatus</a>(org.apache.hadoop.fs.FileSystem fs,
+
org.apache.hadoop.fs.Path dir)
+ throws
<a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<div class="block">Calls fs.listFiles() to get FileStatus and BlockLocations
together for reducing rpc call</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>fs</code> - file system</dd>
+<dd><code>dir</code> - directory</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>LocatedFileStatus list</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code></dd>
+</dl>
+</li>
+</ul>
+<a
name="delete-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-boolean-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>delete</h4>
+<pre>public static boolean <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.710">delete</a>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path path,
+ boolean recursive)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<div class="block">Calls fs.delete() and returns the value returned by the
fs.delete()</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>fs</code> - must not be null</dd>
+<dd><code>path</code> - must not be null</dd>
+<dd><code>recursive</code> - delete tree rooted at path</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>the value returned by the fs.delete()</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code> - from underlying
FileSystem</dd>
+</dl>
+</li>
+</ul>
+<a name="isExists-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>isExists</h4>
+<pre>public static boolean <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.723">isExists</a>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path path)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<div class="block">Calls fs.exists(). Checks if the specified path exists</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>fs</code> - must not be null</dd>
+<dd><code>path</code> - must not be null</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>the value returned by fs.exists()</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code> - from underlying
FileSystem</dd>
+</dl>
+</li>
+</ul>
+<a
name="logFileSystemState-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.commons.logging.Log-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>logFileSystemState</h4>
+<pre>public static void <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.734">logFileSystemState</a>(org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path root,
+ org.apache.commons.logging.Log LOG)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<div class="block">Log the current state of the filesystem from a certain root
directory</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>fs</code> - filesystem to investigate</dd>
+<dd><code>root</code> - root file/directory to start logging from</dd>
+<dd><code>LOG</code> - log to output information</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code> - if an
unexpected exception occurs</dd>
+</dl>
+</li>
+</ul>
+<a
name="logFSTree-org.apache.commons.logging.Log-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-java.lang.String-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>logFSTree</h4>
+<pre>private static void <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.745">logFSTree</a>(org.apache.commons.logging.Log LOG,
+ org.apache.hadoop.fs.FileSystem fs,
+ org.apache.hadoop.fs.Path root,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> prefix)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<div class="block">Recursive helper to log the state of the FS</div>
+<dl>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code></dd>
+<dt><span class="seeLabel">See Also:</span></dt>
+<dd><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.html#logFileSystemState-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.commons.logging.Log-"><code>logFileSystemState(FileSystem,
Path, Log)</code></a></dd>
+</dl>
+</li>
+</ul>
+<a
name="renameAndSetModifyTime-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.Path-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>renameAndSetModifyTime</h4>
+<pre>public static boolean <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.762">renameAndSetModifyTime</a>(org.apache.hadoop.fs.FileSystem fs,
+
org.apache.hadoop.fs.Path src,
+
org.apache.hadoop.fs.Path dest)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></pre>
+<dl>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true"
title="class or interface in java.io">IOException</a></code></dd>
+</dl>
+</li>
+</ul>
+<a name="setupShortCircuitRead-org.apache.hadoop.conf.Configuration-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>setupShortCircuitRead</h4>
+<pre>public static void <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.774">setupShortCircuitRead</a>(org.apache.hadoop.conf.Configuration conf)</pre>
+<div class="block">Do our short circuit read setup.
+ Checks buffer size to use and whether to do checksumming in hbase or
hdfs.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>conf</code> - must not be null</dd>
+</dl>
+</li>
+</ul>
+<a
name="checkShortCircuitReadBufferSize-org.apache.hadoop.conf.Configuration-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>checkShortCircuitReadBufferSize</h4>
+<pre>public static void <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.792">checkShortCircuitReadBufferSize</a>(org.apache.hadoop.conf.Configuration conf)</pre>
+<div class="block">Check if short circuit read buffer size is set and if not,
set it to hbase value.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>conf</code> - must not be null</dd>
+</dl>
+</li>
+</ul>
+<a
name="hasCapability-org.apache.hadoop.fs.FSDataOutputStream-java.lang.String-">
+<!-- -->
+</a>
+<ul class="blockListLast">
+<li class="blockList">
+<h4>hasCapability</h4>
+<pre>public static boolean <a
href="../../../../../src-html/org/apache/hadoop/hbase/util/CommonFSUtils.html#line.848">hasCapability</a>(org.apache.hadoop.fs.FSDataOutputStream stream,
+ <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> capability)</pre>
+<div class="block">If our FileSystem version includes the StreamCapabilities
class, check if
+ the given stream has a particular capability.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>stream</code> - capabilities are per-stream instance, so check this
one specifically. must not be
+ null</dd>
+<dd><code>capability</code> - what to look for, per Hadoop Common's FileSystem
docs</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>true if there are no StreamCapabilities. false if there are, but this
stream doesn't
+ implement it. return result of asking the stream otherwise.</dd>
+</dl>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</div>
+<!-- ========= END OF CLASS DATA ========= -->
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<div class="bottomNav"><a name="navbar.bottom">
+<!-- -->
+</a>
+<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation
links">Skip navigation links</a></div>
+<a name="navbar.bottom.firstrow">
+<!-- -->
+</a>
+<ul class="navList" title="Navigation">
+<li><a href="../../../../../overview-summary.html">Overview</a></li>
+<li><a href="package-summary.html">Package</a></li>
+<li class="navBarCell1Rev">Class</li>
+<li><a href="class-use/CommonFSUtils.html">Use</a></li>
+<li><a href="package-tree.html">Tree</a></li>
+<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
+<li><a href="../../../../../index-all.html">Index</a></li>
+<li><a href="../../../../../help-doc.html">Help</a></li>
+</ul>
+</div>
+<div class="subNav">
+<ul class="navList">
+<li><a
href="../../../../../org/apache/hadoop/hbase/util/CollectionUtils.IOExceptionSupplier.html"
title="interface in org.apache.hadoop.hbase.util"><span
class="typeNameLink">Prev Class</span></a></li>
+<li><a
href="../../../../../org/apache/hadoop/hbase/util/CommonFSUtils.StreamCapabilities.html"
title="class in org.apache.hadoop.hbase.util"><span
class="typeNameLink">Next Class</span></a></li>
+</ul>
+<ul class="navList">
+<li><a
href="../../../../../index.html?org/apache/hadoop/hbase/util/CommonFSUtils.html"
target="_top">Frames</a></li>
+<li><a href="CommonFSUtils.html" target="_top">No Frames</a></li>
+</ul>
+<ul class="navList" id="allclasses_navbar_bottom">
+<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
+</ul>
+<div>
+<script type="text/javascript"><!--
+ allClassesLink = document.getElementById("allclasses_navbar_bottom");
+ if(window==top) {
+ allClassesLink.style.display = "block";
+ }
+ else {
+ allClassesLink.style.display = "none";
+ }
+ //-->
+</script>
+</div>
+<div>
+<ul class="subNavList">
+<li>Summary: </li>
+<li><a href="#nested.class.summary">Nested</a> | </li>
+<li><a href="#field.summary">Field</a> | </li>
+<li><a href="#constructor.summary">Constr</a> | </li>
+<li><a href="#method.summary">Method</a></li>
+</ul>
+<ul class="subNavList">
+<li>Detail: </li>
+<li><a href="#field.detail">Field</a> | </li>
+<li><a href="#constructor.detail">Constr</a> | </li>
+<li><a href="#method.detail">Method</a></li>
+</ul>
+</div>
+<a name="skip.navbar.bottom">
+<!-- -->
+</a></div>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+<p class="legalCopy"><small>Copyright © 2007–2017 <a
href="https://www.apache.org/">The Apache Software Foundation</a>. All rights
reserved.</small></p>
+</body>
+</html>