private boolean isUserReferenced(UserGroupInformation ugi) {
    // if the ugi is in the map, based on invariants above
    // the count must be above zero
    return ugiReferenceCounter.containsKey(ugi);
  }
Bulk loads in secure mode. This service addresses two issues:
<ol>
<li>Moving files in a secure filesystem wherein the HBase Client and HBase Server are different
filesystem users.</li>
<li>Does moving in a secure manner. Assuming that the filesystem is POSIX compliant.</li>
</ol>
The algorithm is as follows:
<ol>
<li>Create an hbase owned staging directory which is world traversable (711):
{@code /hbase/staging}</li>
<li>A user writes out data to his secure output directory: {@code /user/foo/data}</li>
<li>A call is made to hbase to create a secret staging directory which globally rwx (777):
{@code /user/staging/averylongandrandomdirectoryname}</li>
<li>The user moves the data into the random staging directory, then calls bulkLoadHFiles()</li>
</ol>
Like delegation tokens the strength of the security lies in the length and randomness of the
secret directory.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java