| <!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>FileLink (Apache HBase 3.0.0-alpha-2-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="FileLink (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":9,"i4":9,"i5":10,"i6":10,"i7":9,"i8":10,"i9":9,"i10":10,"i11":10,"i12":10,"i13":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance 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/FileLink.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/io/DelegatingInputStream.html" title="class in org.apache.hadoop.hbase.io"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.FileLinkInputStream.html" title="class in org.apache.hadoop.hbase.io"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/hadoop/hbase/io/FileLink.html" target="_top">Frames</a></li> |
| <li><a href="FileLink.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.io</div> |
| <h2 title="Class FileLink" class="title">Class FileLink</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://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.io.FileLink</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/io/HFileLink.html" title="class in org.apache.hadoop.hbase.io">HFileLink</a>, <a href="../../../../../org/apache/hadoop/hbase/io/WALLink.html" title="class in org.apache.hadoop.hbase.io">WALLink</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>@InterfaceAudience.Private |
| public class <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.95">FileLink</a> |
| extends <a href="https://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">The FileLink is a sort of hardlink, that allows access to a file given a set of locations. |
| |
| <p><b>The Problem:</b> |
| <ul> |
| <li> |
| HDFS doesn't have support for hardlinks, and this make impossible to referencing |
| the same data blocks using different names. |
| </li> |
| <li> |
| HBase store files in one location (e.g. table/region/family/) and when the file is not |
| needed anymore (e.g. compaction, region deletion, ...) moves it to an archive directory. |
| </li> |
| </ul> |
| If we want to create a reference to a file, we need to remember that it can be in its |
| original location or in the archive folder. |
| The FileLink class tries to abstract this concept and given a set of locations |
| it is able to switch between them making this operation transparent for the user. |
| <a href="../../../../../org/apache/hadoop/hbase/io/HFileLink.html" title="class in org.apache.hadoop.hbase.io"><code>HFileLink</code></a> is a more concrete implementation of the <code>FileLink</code>. |
| |
| <p><b>Back-references:</b> |
| To help the <a href="../../../../../org/apache/hadoop/hbase/master/cleaner/CleanerChore.html" title="class in org.apache.hadoop.hbase.master.cleaner"><code>CleanerChore</code></a> to keep track of |
| the links to a particular file, during the <code>FileLink</code> creation, a new file is placed |
| inside a back-reference directory. There's one back-reference directory for each file that |
| has links, and in the directory there's one file per link. |
| |
| <p>HFileLink Example |
| <ul> |
| <li> |
| /hbase/table/region-x/cf/file-k |
| (Original File) |
| </li> |
| <li> |
| /hbase/table-cloned/region-y/cf/file-k.region-x.table |
| (HFileLink to the original file) |
| </li> |
| <li> |
| /hbase/table-2nd-cloned/region-z/cf/file-k.region-x.table |
| (HFileLink to the original file) |
| </li> |
| <li> |
| /hbase/.archive/table/region-x/.links-file-k/region-y.table-cloned |
| (Back-reference to the link in table-cloned) |
| </li> |
| <li> |
| /hbase/.archive/table/region-x/.links-file-k/region-z.table-2nd-cloned |
| (Back-reference to the link in table-2nd-cloned) |
| </li> |
| </ul></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/io/FileLink.FileLinkInputStream.html" title="class in org.apache.hadoop.hbase.io">FileLink.FileLinkInputStream</a></span></code> |
| <div class="block">FileLink InputStream that handles the switch between the original path |
| and the alternative locations, when the file is moved.</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="https://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/io/FileLink.html#BACK_REFERENCES_DIRECTORY_PREFIX">BACK_REFERENCES_DIRECTORY_PREFIX</a></span></code> |
| <div class="block">Define the Back-reference directory name prefix: .links-<hfile>/</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private org.apache.hadoop.fs.Path[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#locations">locations</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static org.slf4j.Logger</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#LOG">LOG</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/io/FileLink.html#FileLink--">FileLink</a></span>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code> </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#FileLink-java.util.Collection-">FileLink</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><org.apache.hadoop.fs.Path> locations)</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code> </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#FileLink-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.Path...-">FileLink</a></span>(org.apache.hadoop.fs.Path originPath, |
| org.apache.hadoop.fs.Path... alternativePaths)</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="t2" class="tableTab"><span><a href="javascript:show(2);">Instance 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>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#equals-java.lang.Object-">equals</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#exists-org.apache.hadoop.fs.FileSystem-">exists</a></span>(org.apache.hadoop.fs.FileSystem fs)</code> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>org.apache.hadoop.fs.Path</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#getAvailablePath-org.apache.hadoop.fs.FileSystem-">getAvailablePath</a></span>(org.apache.hadoop.fs.FileSystem fs)</code> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://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/io/FileLink.html#getBackReferenceFileName-org.apache.hadoop.fs.Path-">getBackReferenceFileName</a></span>(org.apache.hadoop.fs.Path dirPath)</code> |
| <div class="block">Get the referenced file name from the reference link directory path.</div> |
| </td> |
| </tr> |
| <tr id="i4" 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/io/FileLink.html#getBackReferencesDir-org.apache.hadoop.fs.Path-java.lang.String-">getBackReferencesDir</a></span>(org.apache.hadoop.fs.Path storeDir, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fileName)</code> |
| <div class="block">Get the directory to store the link back references</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>org.apache.hadoop.fs.FileStatus</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#getFileStatus-org.apache.hadoop.fs.FileSystem-">getFileStatus</a></span>(org.apache.hadoop.fs.FileSystem fs)</code> |
| <div class="block">Get the FileStatus of the referenced file.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>org.apache.hadoop.fs.Path[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#getLocations--">getLocations</a></span>()</code> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#handleAccessLocationException-org.apache.hadoop.hbase.io.FileLink-java.io.IOException-java.io.IOException-">handleAccessLocationException</a></span>(<a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html" title="class in org.apache.hadoop.hbase.io">FileLink</a> fileLink, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a> newException, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a> previousException)</code> |
| <div class="block">Handle exceptions which are thrown when access locations of file link</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#hashCode--">hashCode</a></span>()</code> </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#isBackReferencesDir-org.apache.hadoop.fs.Path-">isBackReferencesDir</a></span>(org.apache.hadoop.fs.Path dirPath)</code> |
| <div class="block">Checks if the specified directory path is a back reference links folder.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>org.apache.hadoop.fs.FSDataInputStream</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#open-org.apache.hadoop.fs.FileSystem-">open</a></span>(org.apache.hadoop.fs.FileSystem fs)</code> |
| <div class="block">Open the FileLink for read.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>org.apache.hadoop.fs.FSDataInputStream</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#open-org.apache.hadoop.fs.FileSystem-int-">open</a></span>(org.apache.hadoop.fs.FileSystem fs, |
| int bufferSize)</code> |
| <div class="block">Open the FileLink for read.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html#setLocations-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.Path...-">setLocations</a></span>(org.apache.hadoop.fs.Path originPath, |
| org.apache.hadoop.fs.Path... alternativePaths)</code> |
| <div class="block">NOTE: This method must be used only in the constructor! |
| It creates a List with the specified locations for the link.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="https://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/io/FileLink.html#toString--">toString</a></span>()</code> </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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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="https://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.slf4j.Logger <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.96">LOG</a></pre> |
| </li> |
| </ul> |
| <a name="BACK_REFERENCES_DIRECTORY_PREFIX"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>BACK_REFERENCES_DIRECTORY_PREFIX</h4> |
| <pre>public static final <a href="https://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/io/FileLink.html#line.99">BACK_REFERENCES_DIRECTORY_PREFIX</a></pre> |
| <div class="block">Define the Back-reference directory name prefix: .links-<hfile>/</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.io.FileLink.BACK_REFERENCES_DIRECTORY_PREFIX">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="locations"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>locations</h4> |
| <pre>private org.apache.hadoop.fs.Path[] <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.334">locations</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="FileLink--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FileLink</h4> |
| <pre>protected <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.336">FileLink</a>()</pre> |
| </li> |
| </ul> |
| <a name="FileLink-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.Path...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FileLink</h4> |
| <pre>public <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.344">FileLink</a>(org.apache.hadoop.fs.Path originPath, |
| org.apache.hadoop.fs.Path... alternativePaths)</pre> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>originPath</code> - Original location of the file to link</dd> |
| <dd><code>alternativePaths</code> - Alternative locations to look for the linked file</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="FileLink-java.util.Collection-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>FileLink</h4> |
| <pre>public <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.351">FileLink</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><org.apache.hadoop.fs.Path> locations)</pre> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>locations</code> - locations to look for the linked file</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getLocations--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLocations</h4> |
| <pre>public org.apache.hadoop.fs.Path[] <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.358">getLocations</a>()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the locations to look for the linked file.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toString--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre>public <a href="https://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/io/FileLink.html#line.363">toString</a>()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code> in class <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="exists-org.apache.hadoop.fs.FileSystem-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>exists</h4> |
| <pre>public boolean <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.377">exists</a>(org.apache.hadoop.fs.FileSystem fs) |
| throws <a href="https://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="returnLabel">Returns:</span></dt> |
| <dd>true if the file pointed by the link exists</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://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="getAvailablePath-org.apache.hadoop.fs.FileSystem-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAvailablePath</h4> |
| <pre>public org.apache.hadoop.fs.Path <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.389">getAvailablePath</a>(org.apache.hadoop.fs.FileSystem fs) |
| throws <a href="https://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="returnLabel">Returns:</span></dt> |
| <dd>the path of the first available link.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://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="getFileStatus-org.apache.hadoop.fs.FileSystem-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFileStatus</h4> |
| <pre>public org.apache.hadoop.fs.FileStatus <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.405">getFileStatus</a>(org.apache.hadoop.fs.FileSystem fs) |
| throws <a href="https://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">Get the FileStatus of the referenced file.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fs</code> - <code>FileSystem</code> on which to get the file status</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>InputStream for the hfile link.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on unexpected error.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="handleAccessLocationException-org.apache.hadoop.hbase.io.FileLink-java.io.IOException-java.io.IOException-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>handleAccessLocationException</h4> |
| <pre>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.429">handleAccessLocationException</a>(<a href="../../../../../org/apache/hadoop/hbase/io/FileLink.html" title="class in org.apache.hadoop.hbase.io">FileLink</a> fileLink, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a> newException, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a> previousException) |
| throws <a href="https://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">Handle exceptions which are thrown when access locations of file link</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fileLink</code> - the file link</dd> |
| <dd><code>newException</code> - the exception caught by access the current location</dd> |
| <dd><code>previousException</code> - the previous exception caught by access the other locations</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>return AccessControlException if access one of the locations caught, otherwise return |
| FileNotFoundException. The AccessControlException is threw if user scan snapshot |
| feature is enabled, see |
| <a href="../../../../../org/apache/hadoop/hbase/security/access/SnapshotScannerHDFSAclController.html" title="class in org.apache.hadoop.hbase.security.access"><code>SnapshotScannerHDFSAclController</code></a>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://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 exception is neither AccessControlException nor |
| FileNotFoundException</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="open-org.apache.hadoop.fs.FileSystem-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>open</h4> |
| <pre>public org.apache.hadoop.fs.FSDataInputStream <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.459">open</a>(org.apache.hadoop.fs.FileSystem fs) |
| throws <a href="https://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">Open the FileLink for read. |
| <p> |
| It uses a wrapper of FSDataInputStream that is agnostic to the location |
| of the file, even if the file switches between locations.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fs</code> - <code>FileSystem</code> on which to open the FileLink</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>InputStream for reading the file link.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on unexpected error.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="open-org.apache.hadoop.fs.FileSystem-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>open</h4> |
| <pre>public org.apache.hadoop.fs.FSDataInputStream <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.474">open</a>(org.apache.hadoop.fs.FileSystem fs, |
| int bufferSize) |
| throws <a href="https://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">Open the FileLink for read. |
| <p> |
| It uses a wrapper of FSDataInputStream that is agnostic to the location |
| of the file, even if the file switches between locations.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fs</code> - <code>FileSystem</code> on which to open the FileLink</dd> |
| <dd><code>bufferSize</code> - the size of the buffer to be used.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>InputStream for reading the file link.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on unexpected error.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setLocations-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.Path...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setLocations</h4> |
| <pre>protected void <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.482">setLocations</a>(org.apache.hadoop.fs.Path originPath, |
| org.apache.hadoop.fs.Path... alternativePaths)</pre> |
| <div class="block">NOTE: This method must be used only in the constructor! |
| It creates a List with the specified locations for the link.</div> |
| </li> |
| </ul> |
| <a name="getBackReferencesDir-org.apache.hadoop.fs.Path-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getBackReferencesDir</h4> |
| <pre>public static org.apache.hadoop.fs.Path <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.508">getBackReferencesDir</a>(org.apache.hadoop.fs.Path storeDir, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fileName)</pre> |
| <div class="block">Get the directory to store the link back references |
| |
| <p>To simplify the reference count process, during the FileLink creation |
| a back-reference is added to the back-reference directory of the specified file.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>storeDir</code> - Root directory for the link reference folder</dd> |
| <dd><code>fileName</code> - File Name with links</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Path for the link back references.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getBackReferenceFileName-org.apache.hadoop.fs.Path-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getBackReferenceFileName</h4> |
| <pre>public static <a href="https://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/io/FileLink.html#line.518">getBackReferenceFileName</a>(org.apache.hadoop.fs.Path dirPath)</pre> |
| <div class="block">Get the referenced file name from the reference link directory path.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>dirPath</code> - Link references directory path</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Name of the file referenced</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isBackReferencesDir-org.apache.hadoop.fs.Path-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isBackReferencesDir</h4> |
| <pre>public static boolean <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.527">isBackReferencesDir</a>(org.apache.hadoop.fs.Path dirPath)</pre> |
| <div class="block">Checks if the specified directory path is a back reference links folder.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>dirPath</code> - Directory path to verify</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>True if the specified directory is a link references folder</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="equals-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equals</h4> |
| <pre>public boolean <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.535">equals</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://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></code> in class <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hashCode--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>hashCode</h4> |
| <pre>public int <a href="../../../../../src-html/org/apache/hadoop/hbase/io/FileLink.html#line.550">hashCode</a>()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a></code> in class <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></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/FileLink.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/io/DelegatingInputStream.html" title="class in org.apache.hadoop.hbase.io"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/hadoop/hbase/io/FileLink.FileLinkInputStream.html" title="class in org.apache.hadoop.hbase.io"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/hadoop/hbase/io/FileLink.html" target="_top">Frames</a></li> |
| <li><a href="FileLink.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–2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |