http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/devapidocs/src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html b/devapidocs/src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html index 32d6965..f910775 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html @@ -128,333 +128,321 @@ <span class="sourceLineNo">120</span> */<a name="line.120"></a> <span class="sourceLineNo">121</span> public static final String SNAPSHOT_WORKING_DIR = "hbase.snapshot.working.dir";<a name="line.121"></a> <span class="sourceLineNo">122</span><a name="line.122"></a> -<span class="sourceLineNo">123</span> /** This tag will be created in in-progess snapshots */<a name="line.123"></a> -<span class="sourceLineNo">124</span> public static final String SNAPSHOT_IN_PROGRESS = ".inprogress";<a name="line.124"></a> -<span class="sourceLineNo">125</span> // snapshot operation values<a name="line.125"></a> -<span class="sourceLineNo">126</span> /** Default value if no start time is specified */<a name="line.126"></a> -<span class="sourceLineNo">127</span> public static final long NO_SNAPSHOT_START_TIME_SPECIFIED = 0;<a name="line.127"></a> -<span class="sourceLineNo">128</span><a name="line.128"></a> +<span class="sourceLineNo">123</span> // snapshot operation values<a name="line.123"></a> +<span class="sourceLineNo">124</span> /** Default value if no start time is specified */<a name="line.124"></a> +<span class="sourceLineNo">125</span> public static final long NO_SNAPSHOT_START_TIME_SPECIFIED = 0;<a name="line.125"></a> +<span class="sourceLineNo">126</span><a name="line.126"></a> +<span class="sourceLineNo">127</span><a name="line.127"></a> +<span class="sourceLineNo">128</span> public static final String MASTER_SNAPSHOT_TIMEOUT_MILLIS = "hbase.snapshot.master.timeout.millis";<a name="line.128"></a> <span class="sourceLineNo">129</span><a name="line.129"></a> -<span class="sourceLineNo">130</span> public static final String MASTER_SNAPSHOT_TIMEOUT_MILLIS = "hbase.snapshot.master.timeout.millis";<a name="line.130"></a> -<span class="sourceLineNo">131</span><a name="line.131"></a> -<span class="sourceLineNo">132</span> /** By default, wait 300 seconds for a snapshot to complete */<a name="line.132"></a> -<span class="sourceLineNo">133</span> public static final long DEFAULT_MAX_WAIT_TIME = 60000 * 5 ;<a name="line.133"></a> -<span class="sourceLineNo">134</span><a name="line.134"></a> -<span class="sourceLineNo">135</span><a name="line.135"></a> -<span class="sourceLineNo">136</span> /**<a name="line.136"></a> -<span class="sourceLineNo">137</span> * By default, check to see if the snapshot is complete (ms)<a name="line.137"></a> -<span class="sourceLineNo">138</span> * @deprecated Use {@link #DEFAULT_MAX_WAIT_TIME} instead.<a name="line.138"></a> -<span class="sourceLineNo">139</span> * */<a name="line.139"></a> -<span class="sourceLineNo">140</span> @Deprecated<a name="line.140"></a> -<span class="sourceLineNo">141</span> public static final int SNAPSHOT_TIMEOUT_MILLIS_DEFAULT = 60000 * 5;<a name="line.141"></a> -<span class="sourceLineNo">142</span><a name="line.142"></a> -<span class="sourceLineNo">143</span> /**<a name="line.143"></a> -<span class="sourceLineNo">144</span> * Conf key for # of ms elapsed before injecting a snapshot timeout error when waiting for<a name="line.144"></a> -<span class="sourceLineNo">145</span> * completion.<a name="line.145"></a> -<span class="sourceLineNo">146</span> * @deprecated Use {@link #MASTER_SNAPSHOT_TIMEOUT_MILLIS} instead.<a name="line.146"></a> -<span class="sourceLineNo">147</span> */<a name="line.147"></a> -<span class="sourceLineNo">148</span> @Deprecated<a name="line.148"></a> -<span class="sourceLineNo">149</span> public static final String SNAPSHOT_TIMEOUT_MILLIS_KEY = "hbase.snapshot.master.timeoutMillis";<a name="line.149"></a> -<span class="sourceLineNo">150</span><a name="line.150"></a> -<span class="sourceLineNo">151</span> private SnapshotDescriptionUtils() {<a name="line.151"></a> -<span class="sourceLineNo">152</span> // private constructor for utility class<a name="line.152"></a> -<span class="sourceLineNo">153</span> }<a name="line.153"></a> -<span class="sourceLineNo">154</span><a name="line.154"></a> -<span class="sourceLineNo">155</span> /**<a name="line.155"></a> -<span class="sourceLineNo">156</span> * @param conf {@link Configuration} from which to check for the timeout<a name="line.156"></a> -<span class="sourceLineNo">157</span> * @param type type of snapshot being taken<a name="line.157"></a> -<span class="sourceLineNo">158</span> * @param defaultMaxWaitTime Default amount of time to wait, if none is in the configuration<a name="line.158"></a> -<span class="sourceLineNo">159</span> * @return the max amount of time the master should wait for a snapshot to complete<a name="line.159"></a> -<span class="sourceLineNo">160</span> */<a name="line.160"></a> -<span class="sourceLineNo">161</span> public static long getMaxMasterTimeout(Configuration conf, SnapshotDescription.Type type,<a name="line.161"></a> -<span class="sourceLineNo">162</span> long defaultMaxWaitTime) {<a name="line.162"></a> -<span class="sourceLineNo">163</span> String confKey;<a name="line.163"></a> -<span class="sourceLineNo">164</span> switch (type) {<a name="line.164"></a> -<span class="sourceLineNo">165</span> case DISABLED:<a name="line.165"></a> -<span class="sourceLineNo">166</span> default:<a name="line.166"></a> -<span class="sourceLineNo">167</span> confKey = MASTER_SNAPSHOT_TIMEOUT_MILLIS;<a name="line.167"></a> -<span class="sourceLineNo">168</span> }<a name="line.168"></a> -<span class="sourceLineNo">169</span> return Math.max(conf.getLong(confKey, defaultMaxWaitTime),<a name="line.169"></a> -<span class="sourceLineNo">170</span> conf.getLong(SNAPSHOT_TIMEOUT_MILLIS_KEY, defaultMaxWaitTime));<a name="line.170"></a> -<span class="sourceLineNo">171</span> }<a name="line.171"></a> -<span class="sourceLineNo">172</span><a name="line.172"></a> -<span class="sourceLineNo">173</span> /**<a name="line.173"></a> -<span class="sourceLineNo">174</span> * Get the snapshot root directory. All the snapshots are kept under this directory, i.e.<a name="line.174"></a> -<span class="sourceLineNo">175</span> * ${hbase.rootdir}/.snapshot<a name="line.175"></a> -<span class="sourceLineNo">176</span> * @param rootDir hbase root directory<a name="line.176"></a> -<span class="sourceLineNo">177</span> * @return the base directory in which all snapshots are kept<a name="line.177"></a> -<span class="sourceLineNo">178</span> */<a name="line.178"></a> -<span class="sourceLineNo">179</span> public static Path getSnapshotRootDir(final Path rootDir) {<a name="line.179"></a> -<span class="sourceLineNo">180</span> return new Path(rootDir, HConstants.SNAPSHOT_DIR_NAME);<a name="line.180"></a> -<span class="sourceLineNo">181</span> }<a name="line.181"></a> -<span class="sourceLineNo">182</span><a name="line.182"></a> -<span class="sourceLineNo">183</span> /**<a name="line.183"></a> -<span class="sourceLineNo">184</span> * Get the directory for a specified snapshot. This directory is a sub-directory of snapshot root<a name="line.184"></a> -<span class="sourceLineNo">185</span> * directory and all the data files for a snapshot are kept under this directory.<a name="line.185"></a> -<span class="sourceLineNo">186</span> * @param snapshot snapshot being taken<a name="line.186"></a> -<span class="sourceLineNo">187</span> * @param rootDir hbase root directory<a name="line.187"></a> -<span class="sourceLineNo">188</span> * @return the final directory for the completed snapshot<a name="line.188"></a> -<span class="sourceLineNo">189</span> */<a name="line.189"></a> -<span class="sourceLineNo">190</span> public static Path getCompletedSnapshotDir(final SnapshotDescription snapshot, final Path rootDir) {<a name="line.190"></a> -<span class="sourceLineNo">191</span> return getCompletedSnapshotDir(snapshot.getName(), rootDir);<a name="line.191"></a> -<span class="sourceLineNo">192</span> }<a name="line.192"></a> -<span class="sourceLineNo">193</span><a name="line.193"></a> -<span class="sourceLineNo">194</span> /**<a name="line.194"></a> -<span class="sourceLineNo">195</span> * Get the directory for a completed snapshot. This directory is a sub-directory of snapshot root<a name="line.195"></a> -<span class="sourceLineNo">196</span> * directory and all the data files for a snapshot are kept under this directory.<a name="line.196"></a> -<span class="sourceLineNo">197</span> * @param snapshotName name of the snapshot being taken<a name="line.197"></a> -<span class="sourceLineNo">198</span> * @param rootDir hbase root directory<a name="line.198"></a> -<span class="sourceLineNo">199</span> * @return the final directory for the completed snapshot<a name="line.199"></a> -<span class="sourceLineNo">200</span> */<a name="line.200"></a> -<span class="sourceLineNo">201</span> public static Path getCompletedSnapshotDir(final String snapshotName, final Path rootDir) {<a name="line.201"></a> -<span class="sourceLineNo">202</span> return getSpecifiedSnapshotDir(getSnapshotsDir(rootDir), snapshotName);<a name="line.202"></a> -<span class="sourceLineNo">203</span> }<a name="line.203"></a> -<span class="sourceLineNo">204</span><a name="line.204"></a> -<span class="sourceLineNo">205</span> /**<a name="line.205"></a> -<span class="sourceLineNo">206</span> * Get the general working directory for snapshots - where they are built, where they are<a name="line.206"></a> -<span class="sourceLineNo">207</span> * temporarily copied on export, etc.<a name="line.207"></a> -<span class="sourceLineNo">208</span> * @param rootDir root directory of the HBase installation<a name="line.208"></a> -<span class="sourceLineNo">209</span> * @param conf Configuration of the HBase instance<a name="line.209"></a> -<span class="sourceLineNo">210</span> * @return Path to the snapshot tmp directory, relative to the passed root directory<a name="line.210"></a> -<span class="sourceLineNo">211</span> */<a name="line.211"></a> -<span class="sourceLineNo">212</span> public static Path getWorkingSnapshotDir(final Path rootDir, final Configuration conf) {<a name="line.212"></a> -<span class="sourceLineNo">213</span> return new Path(conf.get(SNAPSHOT_WORKING_DIR,<a name="line.213"></a> -<span class="sourceLineNo">214</span> getDefaultWorkingSnapshotDir(rootDir).toString()));<a name="line.214"></a> -<span class="sourceLineNo">215</span> }<a name="line.215"></a> -<span class="sourceLineNo">216</span><a name="line.216"></a> -<span class="sourceLineNo">217</span> /**<a name="line.217"></a> -<span class="sourceLineNo">218</span> * Get the directory to build a snapshot, before it is finalized<a name="line.218"></a> -<span class="sourceLineNo">219</span> * @param snapshot snapshot that will be built<a name="line.219"></a> -<span class="sourceLineNo">220</span> * @param rootDir root directory of the hbase installation<a name="line.220"></a> -<span class="sourceLineNo">221</span> * @param conf Configuration of the HBase instance<a name="line.221"></a> -<span class="sourceLineNo">222</span> * @return {@link Path} where one can build a snapshot<a name="line.222"></a> -<span class="sourceLineNo">223</span> */<a name="line.223"></a> -<span class="sourceLineNo">224</span> public static Path getWorkingSnapshotDir(SnapshotDescription snapshot, final Path rootDir,<a name="line.224"></a> -<span class="sourceLineNo">225</span> Configuration conf) {<a name="line.225"></a> -<span class="sourceLineNo">226</span> return getWorkingSnapshotDir(snapshot.getName(), rootDir, conf);<a name="line.226"></a> -<span class="sourceLineNo">227</span> }<a name="line.227"></a> -<span class="sourceLineNo">228</span><a name="line.228"></a> -<span class="sourceLineNo">229</span> /**<a name="line.229"></a> -<span class="sourceLineNo">230</span> * Get the directory to build a snapshot, before it is finalized<a name="line.230"></a> -<span class="sourceLineNo">231</span> * @param snapshotName name of the snapshot<a name="line.231"></a> -<span class="sourceLineNo">232</span> * @param rootDir root directory of the hbase installation<a name="line.232"></a> -<span class="sourceLineNo">233</span> * @param conf Configuration of the HBase instance<a name="line.233"></a> -<span class="sourceLineNo">234</span> * @return {@link Path} where one can build a snapshot<a name="line.234"></a> -<span class="sourceLineNo">235</span> */<a name="line.235"></a> -<span class="sourceLineNo">236</span> public static Path getWorkingSnapshotDir(String snapshotName, final Path rootDir,<a name="line.236"></a> -<span class="sourceLineNo">237</span> Configuration conf) {<a name="line.237"></a> -<span class="sourceLineNo">238</span> return getSpecifiedSnapshotDir(getWorkingSnapshotDir(rootDir, conf), snapshotName);<a name="line.238"></a> -<span class="sourceLineNo">239</span> }<a name="line.239"></a> -<span class="sourceLineNo">240</span><a name="line.240"></a> -<span class="sourceLineNo">241</span> /**<a name="line.241"></a> -<span class="sourceLineNo">242</span> * Get the directory within the given filepath to store the snapshot instance<a name="line.242"></a> -<span class="sourceLineNo">243</span> * @param snapshotsDir directory to store snapshot directory within<a name="line.243"></a> -<span class="sourceLineNo">244</span> * @param snapshotName name of the snapshot to take<a name="line.244"></a> -<span class="sourceLineNo">245</span> * @return the final directory for the snapshot in the given filepath<a name="line.245"></a> -<span class="sourceLineNo">246</span> */<a name="line.246"></a> -<span class="sourceLineNo">247</span> private static final Path getSpecifiedSnapshotDir(final Path snapshotsDir, String snapshotName) {<a name="line.247"></a> -<span class="sourceLineNo">248</span> return new Path(snapshotsDir, snapshotName);<a name="line.248"></a> -<span class="sourceLineNo">249</span> }<a name="line.249"></a> -<span class="sourceLineNo">250</span><a name="line.250"></a> -<span class="sourceLineNo">251</span> /**<a name="line.251"></a> -<span class="sourceLineNo">252</span> * @param rootDir hbase root directory<a name="line.252"></a> -<span class="sourceLineNo">253</span> * @return the directory for all completed snapshots;<a name="line.253"></a> -<span class="sourceLineNo">254</span> */<a name="line.254"></a> -<span class="sourceLineNo">255</span> public static final Path getSnapshotsDir(Path rootDir) {<a name="line.255"></a> -<span class="sourceLineNo">256</span> return new Path(rootDir, HConstants.SNAPSHOT_DIR_NAME);<a name="line.256"></a> -<span class="sourceLineNo">257</span> }<a name="line.257"></a> -<span class="sourceLineNo">258</span><a name="line.258"></a> -<span class="sourceLineNo">259</span> /**<a name="line.259"></a> -<span class="sourceLineNo">260</span> * Determines if the given workingDir is a subdirectory of the given "root directory"<a name="line.260"></a> -<span class="sourceLineNo">261</span> * @param workingDir a directory to check<a name="line.261"></a> -<span class="sourceLineNo">262</span> * @param rootDir root directory of the HBase installation<a name="line.262"></a> -<span class="sourceLineNo">263</span> * @return true if the given workingDir is a subdirectory of the given root directory,<a name="line.263"></a> -<span class="sourceLineNo">264</span> * false otherwise<a name="line.264"></a> -<span class="sourceLineNo">265</span> */<a name="line.265"></a> -<span class="sourceLineNo">266</span> public static boolean isSubDirectoryOf(final Path workingDir, final Path rootDir) {<a name="line.266"></a> -<span class="sourceLineNo">267</span> return workingDir.toString().startsWith(rootDir.toString() + Path.SEPARATOR);<a name="line.267"></a> -<span class="sourceLineNo">268</span> }<a name="line.268"></a> -<span class="sourceLineNo">269</span><a name="line.269"></a> -<span class="sourceLineNo">270</span> /**<a name="line.270"></a> -<span class="sourceLineNo">271</span> * Determines if the given workingDir is a subdirectory of the default working snapshot directory<a name="line.271"></a> -<span class="sourceLineNo">272</span> * @param workingDir a directory to check<a name="line.272"></a> -<span class="sourceLineNo">273</span> * @param conf configuration for the HBase cluster<a name="line.273"></a> -<span class="sourceLineNo">274</span> * @return true if the given workingDir is a subdirectory of the default working directory for<a name="line.274"></a> -<span class="sourceLineNo">275</span> * snapshots, false otherwise<a name="line.275"></a> -<span class="sourceLineNo">276</span> */<a name="line.276"></a> -<span class="sourceLineNo">277</span> public static boolean isWithinDefaultWorkingDir(final Path workingDir, Configuration conf) {<a name="line.277"></a> -<span class="sourceLineNo">278</span> Path defaultWorkingDir = getDefaultWorkingSnapshotDir(new Path(conf.get(HConstants.HBASE_DIR)));<a name="line.278"></a> -<span class="sourceLineNo">279</span> return workingDir.equals(defaultWorkingDir) || isSubDirectoryOf(workingDir, defaultWorkingDir);<a name="line.279"></a> -<span class="sourceLineNo">280</span> }<a name="line.280"></a> -<span class="sourceLineNo">281</span><a name="line.281"></a> -<span class="sourceLineNo">282</span> /**<a name="line.282"></a> -<span class="sourceLineNo">283</span> * Get the default working directory for snapshots - where they are built, where they are<a name="line.283"></a> -<span class="sourceLineNo">284</span> * temporarily copied on export, etc.<a name="line.284"></a> -<span class="sourceLineNo">285</span> * @param rootDir root directory of the HBase installation<a name="line.285"></a> -<span class="sourceLineNo">286</span> * @return Path to the default snapshot tmp directory, relative to the passed root directory<a name="line.286"></a> -<span class="sourceLineNo">287</span> */<a name="line.287"></a> -<span class="sourceLineNo">288</span> private static Path getDefaultWorkingSnapshotDir(final Path rootDir) {<a name="line.288"></a> -<span class="sourceLineNo">289</span> return new Path(getSnapshotsDir(rootDir), SNAPSHOT_TMP_DIR_NAME);<a name="line.289"></a> -<span class="sourceLineNo">290</span> }<a name="line.290"></a> -<span class="sourceLineNo">291</span><a name="line.291"></a> -<span class="sourceLineNo">292</span> /**<a name="line.292"></a> -<span class="sourceLineNo">293</span> * Convert the passed snapshot description into a 'full' snapshot description based on default<a name="line.293"></a> -<span class="sourceLineNo">294</span> * parameters, if none have been supplied. This resolves any 'optional' parameters that aren't<a name="line.294"></a> -<span class="sourceLineNo">295</span> * supplied to their default values.<a name="line.295"></a> -<span class="sourceLineNo">296</span> * @param snapshot general snapshot descriptor<a name="line.296"></a> -<span class="sourceLineNo">297</span> * @param conf Configuration to read configured snapshot defaults if snapshot is not complete<a name="line.297"></a> -<span class="sourceLineNo">298</span> * @return a valid snapshot description<a name="line.298"></a> -<span class="sourceLineNo">299</span> * @throws IllegalArgumentException if the {@link SnapshotDescription} is not a complete<a name="line.299"></a> -<span class="sourceLineNo">300</span> * {@link SnapshotDescription}.<a name="line.300"></a> -<span class="sourceLineNo">301</span> */<a name="line.301"></a> -<span class="sourceLineNo">302</span> public static SnapshotDescription validate(SnapshotDescription snapshot, Configuration conf)<a name="line.302"></a> -<span class="sourceLineNo">303</span> throws IllegalArgumentException, IOException {<a name="line.303"></a> -<span class="sourceLineNo">304</span> if (!snapshot.hasTable()) {<a name="line.304"></a> -<span class="sourceLineNo">305</span> throw new IllegalArgumentException(<a name="line.305"></a> -<span class="sourceLineNo">306</span> "Descriptor doesn't apply to a table, so we can't build it.");<a name="line.306"></a> -<span class="sourceLineNo">307</span> }<a name="line.307"></a> -<span class="sourceLineNo">308</span><a name="line.308"></a> -<span class="sourceLineNo">309</span> // set the creation time, if one hasn't been set<a name="line.309"></a> -<span class="sourceLineNo">310</span> long time = snapshot.getCreationTime();<a name="line.310"></a> -<span class="sourceLineNo">311</span> if (time == SnapshotDescriptionUtils.NO_SNAPSHOT_START_TIME_SPECIFIED) {<a name="line.311"></a> -<span class="sourceLineNo">312</span> time = EnvironmentEdgeManager.currentTime();<a name="line.312"></a> -<span class="sourceLineNo">313</span> LOG.debug("Creation time not specified, setting to:" + time + " (current time:"<a name="line.313"></a> -<span class="sourceLineNo">314</span> + EnvironmentEdgeManager.currentTime() + ").");<a name="line.314"></a> -<span class="sourceLineNo">315</span> SnapshotDescription.Builder builder = snapshot.toBuilder();<a name="line.315"></a> -<span class="sourceLineNo">316</span> builder.setCreationTime(time);<a name="line.316"></a> -<span class="sourceLineNo">317</span> snapshot = builder.build();<a name="line.317"></a> -<span class="sourceLineNo">318</span> }<a name="line.318"></a> -<span class="sourceLineNo">319</span><a name="line.319"></a> -<span class="sourceLineNo">320</span> // set the acl to snapshot if security feature is enabled.<a name="line.320"></a> -<span class="sourceLineNo">321</span> if (isSecurityAvailable(conf)) {<a name="line.321"></a> -<span class="sourceLineNo">322</span> snapshot = writeAclToSnapshotDescription(snapshot, conf);<a name="line.322"></a> -<span class="sourceLineNo">323</span> }<a name="line.323"></a> -<span class="sourceLineNo">324</span> return snapshot;<a name="line.324"></a> -<span class="sourceLineNo">325</span> }<a name="line.325"></a> -<span class="sourceLineNo">326</span><a name="line.326"></a> -<span class="sourceLineNo">327</span> /**<a name="line.327"></a> -<span class="sourceLineNo">328</span> * Write the snapshot description into the working directory of a snapshot<a name="line.328"></a> -<span class="sourceLineNo">329</span> * @param snapshot description of the snapshot being taken<a name="line.329"></a> -<span class="sourceLineNo">330</span> * @param workingDir working directory of the snapshot<a name="line.330"></a> -<span class="sourceLineNo">331</span> * @param fs {@link FileSystem} on which the snapshot should be taken<a name="line.331"></a> -<span class="sourceLineNo">332</span> * @throws IOException if we can't reach the filesystem and the file cannot be cleaned up on<a name="line.332"></a> -<span class="sourceLineNo">333</span> * failure<a name="line.333"></a> -<span class="sourceLineNo">334</span> */<a name="line.334"></a> -<span class="sourceLineNo">335</span> public static void writeSnapshotInfo(SnapshotDescription snapshot, Path workingDir, FileSystem fs)<a name="line.335"></a> -<span class="sourceLineNo">336</span> throws IOException {<a name="line.336"></a> -<span class="sourceLineNo">337</span> FsPermission perms = FSUtils.getFilePermissions(fs, fs.getConf(),<a name="line.337"></a> -<span class="sourceLineNo">338</span> HConstants.DATA_FILE_UMASK_KEY);<a name="line.338"></a> -<span class="sourceLineNo">339</span> Path snapshotInfo = new Path(workingDir, SnapshotDescriptionUtils.SNAPSHOTINFO_FILE);<a name="line.339"></a> -<span class="sourceLineNo">340</span> try {<a name="line.340"></a> -<span class="sourceLineNo">341</span> FSDataOutputStream out = FSUtils.create(fs, snapshotInfo, perms, true);<a name="line.341"></a> -<span class="sourceLineNo">342</span> try {<a name="line.342"></a> -<span class="sourceLineNo">343</span> snapshot.writeTo(out);<a name="line.343"></a> -<span class="sourceLineNo">344</span> } finally {<a name="line.344"></a> -<span class="sourceLineNo">345</span> out.close();<a name="line.345"></a> -<span class="sourceLineNo">346</span> }<a name="line.346"></a> -<span class="sourceLineNo">347</span> } catch (IOException e) {<a name="line.347"></a> -<span class="sourceLineNo">348</span> // if we get an exception, try to remove the snapshot info<a name="line.348"></a> -<span class="sourceLineNo">349</span> if (!fs.delete(snapshotInfo, false)) {<a name="line.349"></a> -<span class="sourceLineNo">350</span> String msg = "Couldn't delete snapshot info file: " + snapshotInfo;<a name="line.350"></a> -<span class="sourceLineNo">351</span> LOG.error(msg);<a name="line.351"></a> -<span class="sourceLineNo">352</span> throw new IOException(msg);<a name="line.352"></a> -<span class="sourceLineNo">353</span> }<a name="line.353"></a> -<span class="sourceLineNo">354</span> }<a name="line.354"></a> -<span class="sourceLineNo">355</span> }<a name="line.355"></a> -<span class="sourceLineNo">356</span><a name="line.356"></a> -<span class="sourceLineNo">357</span> /**<a name="line.357"></a> -<span class="sourceLineNo">358</span> * Create in-progress tag under .tmp of in-progress snapshot<a name="line.358"></a> -<span class="sourceLineNo">359</span> * */<a name="line.359"></a> -<span class="sourceLineNo">360</span> public static void createInProgressTag(Path workingDir, FileSystem fs) throws IOException {<a name="line.360"></a> -<span class="sourceLineNo">361</span> FsPermission perms = FSUtils.getFilePermissions(fs, fs.getConf(),<a name="line.361"></a> -<span class="sourceLineNo">362</span> HConstants.DATA_FILE_UMASK_KEY);<a name="line.362"></a> -<span class="sourceLineNo">363</span> Path snapshot_in_progress = new Path(workingDir, SnapshotDescriptionUtils.SNAPSHOT_IN_PROGRESS);<a name="line.363"></a> -<span class="sourceLineNo">364</span> FSUtils.create(fs, snapshot_in_progress, perms, true);<a name="line.364"></a> -<span class="sourceLineNo">365</span> }<a name="line.365"></a> -<span class="sourceLineNo">366</span><a name="line.366"></a> -<span class="sourceLineNo">367</span> /**<a name="line.367"></a> -<span class="sourceLineNo">368</span> * Read in the {@link org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription} stored for the snapshot in the passed directory<a name="line.368"></a> -<span class="sourceLineNo">369</span> * @param fs filesystem where the snapshot was taken<a name="line.369"></a> -<span class="sourceLineNo">370</span> * @param snapshotDir directory where the snapshot was stored<a name="line.370"></a> -<span class="sourceLineNo">371</span> * @return the stored snapshot description<a name="line.371"></a> -<span class="sourceLineNo">372</span> * @throws CorruptedSnapshotException if the<a name="line.372"></a> -<span class="sourceLineNo">373</span> * snapshot cannot be read<a name="line.373"></a> -<span class="sourceLineNo">374</span> */<a name="line.374"></a> -<span class="sourceLineNo">375</span> public static SnapshotDescription readSnapshotInfo(FileSystem fs, Path snapshotDir)<a name="line.375"></a> -<span class="sourceLineNo">376</span> throws CorruptedSnapshotException {<a name="line.376"></a> -<span class="sourceLineNo">377</span> Path snapshotInfo = new Path(snapshotDir, SNAPSHOTINFO_FILE);<a name="line.377"></a> -<span class="sourceLineNo">378</span> try {<a name="line.378"></a> -<span class="sourceLineNo">379</span> FSDataInputStream in = null;<a name="line.379"></a> -<span class="sourceLineNo">380</span> try {<a name="line.380"></a> -<span class="sourceLineNo">381</span> in = fs.open(snapshotInfo);<a name="line.381"></a> -<span class="sourceLineNo">382</span> SnapshotDescription desc = SnapshotDescription.parseFrom(in);<a name="line.382"></a> -<span class="sourceLineNo">383</span> return desc;<a name="line.383"></a> -<span class="sourceLineNo">384</span> } finally {<a name="line.384"></a> -<span class="sourceLineNo">385</span> if (in != null) in.close();<a name="line.385"></a> -<span class="sourceLineNo">386</span> }<a name="line.386"></a> -<span class="sourceLineNo">387</span> } catch (IOException e) {<a name="line.387"></a> -<span class="sourceLineNo">388</span> throw new CorruptedSnapshotException("Couldn't read snapshot info from:" + snapshotInfo, e);<a name="line.388"></a> -<span class="sourceLineNo">389</span> }<a name="line.389"></a> -<span class="sourceLineNo">390</span> }<a name="line.390"></a> -<span class="sourceLineNo">391</span><a name="line.391"></a> -<span class="sourceLineNo">392</span> /**<a name="line.392"></a> -<span class="sourceLineNo">393</span> * Move the finished snapshot to its final, publicly visible directory - this marks the snapshot<a name="line.393"></a> -<span class="sourceLineNo">394</span> * as 'complete'.<a name="line.394"></a> -<span class="sourceLineNo">395</span> * @param snapshot description of the snapshot being tabken<a name="line.395"></a> -<span class="sourceLineNo">396</span> * @param rootdir root directory of the hbase installation<a name="line.396"></a> -<span class="sourceLineNo">397</span> * @param workingDir directory where the in progress snapshot was built<a name="line.397"></a> -<span class="sourceLineNo">398</span> * @param fs {@link FileSystem} where the snapshot was built<a name="line.398"></a> -<span class="sourceLineNo">399</span> * @throws org.apache.hadoop.hbase.snapshot.SnapshotCreationException if the<a name="line.399"></a> -<span class="sourceLineNo">400</span> * snapshot could not be moved<a name="line.400"></a> -<span class="sourceLineNo">401</span> * @throws IOException the filesystem could not be reached<a name="line.401"></a> -<span class="sourceLineNo">402</span> */<a name="line.402"></a> -<span class="sourceLineNo">403</span> public static void completeSnapshot(SnapshotDescription snapshot, Path rootdir, Path workingDir,<a name="line.403"></a> -<span class="sourceLineNo">404</span> FileSystem fs) throws SnapshotCreationException, IOException {<a name="line.404"></a> -<span class="sourceLineNo">405</span> Path finishedDir = getCompletedSnapshotDir(snapshot, rootdir);<a name="line.405"></a> -<span class="sourceLineNo">406</span> LOG.debug("Snapshot is done, just moving the snapshot from " + workingDir + " to "<a name="line.406"></a> -<span class="sourceLineNo">407</span> + finishedDir);<a name="line.407"></a> -<span class="sourceLineNo">408</span> if (!fs.rename(workingDir, finishedDir)) {<a name="line.408"></a> -<span class="sourceLineNo">409</span> throw new SnapshotCreationException(<a name="line.409"></a> -<span class="sourceLineNo">410</span> "Failed to move working directory(" + workingDir + ") to completed directory("<a name="line.410"></a> -<span class="sourceLineNo">411</span> + finishedDir + ").", ProtobufUtil.createSnapshotDesc(snapshot));<a name="line.411"></a> -<span class="sourceLineNo">412</span> }<a name="line.412"></a> -<span class="sourceLineNo">413</span> }<a name="line.413"></a> -<span class="sourceLineNo">414</span><a name="line.414"></a> -<span class="sourceLineNo">415</span> /**<a name="line.415"></a> -<span class="sourceLineNo">416</span> * Check if the user is this table snapshot's owner<a name="line.416"></a> -<span class="sourceLineNo">417</span> * @param snapshot the table snapshot description<a name="line.417"></a> -<span class="sourceLineNo">418</span> * @param user the user<a name="line.418"></a> -<span class="sourceLineNo">419</span> * @return true if the user is the owner of the snapshot,<a name="line.419"></a> -<span class="sourceLineNo">420</span> * false otherwise or the snapshot owner field is not present.<a name="line.420"></a> -<span class="sourceLineNo">421</span> */<a name="line.421"></a> -<span class="sourceLineNo">422</span> public static boolean isSnapshotOwner(org.apache.hadoop.hbase.client.SnapshotDescription snapshot,<a name="line.422"></a> -<span class="sourceLineNo">423</span> User user) {<a name="line.423"></a> -<span class="sourceLineNo">424</span> if (user == null) return false;<a name="line.424"></a> -<span class="sourceLineNo">425</span> return user.getShortName().equals(snapshot.getOwner());<a name="line.425"></a> -<span class="sourceLineNo">426</span> }<a name="line.426"></a> -<span class="sourceLineNo">427</span><a name="line.427"></a> -<span class="sourceLineNo">428</span> public static boolean isSecurityAvailable(Configuration conf) throws IOException {<a name="line.428"></a> -<span class="sourceLineNo">429</span> try (Connection conn = ConnectionFactory.createConnection(conf)) {<a name="line.429"></a> -<span class="sourceLineNo">430</span> try (Admin admin = conn.getAdmin()) {<a name="line.430"></a> -<span class="sourceLineNo">431</span> return admin.tableExists(AccessControlLists.ACL_TABLE_NAME);<a name="line.431"></a> -<span class="sourceLineNo">432</span> }<a name="line.432"></a> -<span class="sourceLineNo">433</span> }<a name="line.433"></a> -<span class="sourceLineNo">434</span> }<a name="line.434"></a> -<span class="sourceLineNo">435</span><a name="line.435"></a> -<span class="sourceLineNo">436</span> private static SnapshotDescription writeAclToSnapshotDescription(SnapshotDescription snapshot,<a name="line.436"></a> -<span class="sourceLineNo">437</span> Configuration conf) throws IOException {<a name="line.437"></a> -<span class="sourceLineNo">438</span> ListMultimap<String, UserPermission> perms =<a name="line.438"></a> -<span class="sourceLineNo">439</span> User.runAsLoginUser(new PrivilegedExceptionAction<ListMultimap<String, UserPermission>>() {<a name="line.439"></a> -<span class="sourceLineNo">440</span> @Override<a name="line.440"></a> -<span class="sourceLineNo">441</span> public ListMultimap<String, UserPermission> run() throws Exception {<a name="line.441"></a> -<span class="sourceLineNo">442</span> return AccessControlLists.getTablePermissions(conf,<a name="line.442"></a> -<span class="sourceLineNo">443</span> TableName.valueOf(snapshot.getTable()));<a name="line.443"></a> -<span class="sourceLineNo">444</span> }<a name="line.444"></a> -<span class="sourceLineNo">445</span> });<a name="line.445"></a> -<span class="sourceLineNo">446</span> return snapshot.toBuilder()<a name="line.446"></a> -<span class="sourceLineNo">447</span> .setUsersAndPermissions(ShadedAccessControlUtil.toUserTablePermissions(perms)).build();<a name="line.447"></a> -<span class="sourceLineNo">448</span> }<a name="line.448"></a> -<span class="sourceLineNo">449</span>}<a name="line.449"></a> +<span class="sourceLineNo">130</span> /** By default, wait 300 seconds for a snapshot to complete */<a name="line.130"></a> +<span class="sourceLineNo">131</span> public static final long DEFAULT_MAX_WAIT_TIME = 60000 * 5 ;<a name="line.131"></a> +<span class="sourceLineNo">132</span><a name="line.132"></a> +<span class="sourceLineNo">133</span><a name="line.133"></a> +<span class="sourceLineNo">134</span> /**<a name="line.134"></a> +<span class="sourceLineNo">135</span> * By default, check to see if the snapshot is complete (ms)<a name="line.135"></a> +<span class="sourceLineNo">136</span> * @deprecated Use {@link #DEFAULT_MAX_WAIT_TIME} instead.<a name="line.136"></a> +<span class="sourceLineNo">137</span> * */<a name="line.137"></a> +<span class="sourceLineNo">138</span> @Deprecated<a name="line.138"></a> +<span class="sourceLineNo">139</span> public static final int SNAPSHOT_TIMEOUT_MILLIS_DEFAULT = 60000 * 5;<a name="line.139"></a> +<span class="sourceLineNo">140</span><a name="line.140"></a> +<span class="sourceLineNo">141</span> /**<a name="line.141"></a> +<span class="sourceLineNo">142</span> * Conf key for # of ms elapsed before injecting a snapshot timeout error when waiting for<a name="line.142"></a> +<span class="sourceLineNo">143</span> * completion.<a name="line.143"></a> +<span class="sourceLineNo">144</span> * @deprecated Use {@link #MASTER_SNAPSHOT_TIMEOUT_MILLIS} instead.<a name="line.144"></a> +<span class="sourceLineNo">145</span> */<a name="line.145"></a> +<span class="sourceLineNo">146</span> @Deprecated<a name="line.146"></a> +<span class="sourceLineNo">147</span> public static final String SNAPSHOT_TIMEOUT_MILLIS_KEY = "hbase.snapshot.master.timeoutMillis";<a name="line.147"></a> +<span class="sourceLineNo">148</span><a name="line.148"></a> +<span class="sourceLineNo">149</span> private SnapshotDescriptionUtils() {<a name="line.149"></a> +<span class="sourceLineNo">150</span> // private constructor for utility class<a name="line.150"></a> +<span class="sourceLineNo">151</span> }<a name="line.151"></a> +<span class="sourceLineNo">152</span><a name="line.152"></a> +<span class="sourceLineNo">153</span> /**<a name="line.153"></a> +<span class="sourceLineNo">154</span> * @param conf {@link Configuration} from which to check for the timeout<a name="line.154"></a> +<span class="sourceLineNo">155</span> * @param type type of snapshot being taken<a name="line.155"></a> +<span class="sourceLineNo">156</span> * @param defaultMaxWaitTime Default amount of time to wait, if none is in the configuration<a name="line.156"></a> +<span class="sourceLineNo">157</span> * @return the max amount of time the master should wait for a snapshot to complete<a name="line.157"></a> +<span class="sourceLineNo">158</span> */<a name="line.158"></a> +<span class="sourceLineNo">159</span> public static long getMaxMasterTimeout(Configuration conf, SnapshotDescription.Type type,<a name="line.159"></a> +<span class="sourceLineNo">160</span> long defaultMaxWaitTime) {<a name="line.160"></a> +<span class="sourceLineNo">161</span> String confKey;<a name="line.161"></a> +<span class="sourceLineNo">162</span> switch (type) {<a name="line.162"></a> +<span class="sourceLineNo">163</span> case DISABLED:<a name="line.163"></a> +<span class="sourceLineNo">164</span> default:<a name="line.164"></a> +<span class="sourceLineNo">165</span> confKey = MASTER_SNAPSHOT_TIMEOUT_MILLIS;<a name="line.165"></a> +<span class="sourceLineNo">166</span> }<a name="line.166"></a> +<span class="sourceLineNo">167</span> return Math.max(conf.getLong(confKey, defaultMaxWaitTime),<a name="line.167"></a> +<span class="sourceLineNo">168</span> conf.getLong(SNAPSHOT_TIMEOUT_MILLIS_KEY, defaultMaxWaitTime));<a name="line.168"></a> +<span class="sourceLineNo">169</span> }<a name="line.169"></a> +<span class="sourceLineNo">170</span><a name="line.170"></a> +<span class="sourceLineNo">171</span> /**<a name="line.171"></a> +<span class="sourceLineNo">172</span> * Get the snapshot root directory. All the snapshots are kept under this directory, i.e.<a name="line.172"></a> +<span class="sourceLineNo">173</span> * ${hbase.rootdir}/.snapshot<a name="line.173"></a> +<span class="sourceLineNo">174</span> * @param rootDir hbase root directory<a name="line.174"></a> +<span class="sourceLineNo">175</span> * @return the base directory in which all snapshots are kept<a name="line.175"></a> +<span class="sourceLineNo">176</span> */<a name="line.176"></a> +<span class="sourceLineNo">177</span> public static Path getSnapshotRootDir(final Path rootDir) {<a name="line.177"></a> +<span class="sourceLineNo">178</span> return new Path(rootDir, HConstants.SNAPSHOT_DIR_NAME);<a name="line.178"></a> +<span class="sourceLineNo">179</span> }<a name="line.179"></a> +<span class="sourceLineNo">180</span><a name="line.180"></a> +<span class="sourceLineNo">181</span> /**<a name="line.181"></a> +<span class="sourceLineNo">182</span> * Get the directory for a specified snapshot. This directory is a sub-directory of snapshot root<a name="line.182"></a> +<span class="sourceLineNo">183</span> * directory and all the data files for a snapshot are kept under this directory.<a name="line.183"></a> +<span class="sourceLineNo">184</span> * @param snapshot snapshot being taken<a name="line.184"></a> +<span class="sourceLineNo">185</span> * @param rootDir hbase root directory<a name="line.185"></a> +<span class="sourceLineNo">186</span> * @return the final directory for the completed snapshot<a name="line.186"></a> +<span class="sourceLineNo">187</span> */<a name="line.187"></a> +<span class="sourceLineNo">188</span> public static Path getCompletedSnapshotDir(final SnapshotDescription snapshot, final Path rootDir) {<a name="line.188"></a> +<span class="sourceLineNo">189</span> return getCompletedSnapshotDir(snapshot.getName(), rootDir);<a name="line.189"></a> +<span class="sourceLineNo">190</span> }<a name="line.190"></a> +<span class="sourceLineNo">191</span><a name="line.191"></a> +<span class="sourceLineNo">192</span> /**<a name="line.192"></a> +<span class="sourceLineNo">193</span> * Get the directory for a completed snapshot. This directory is a sub-directory of snapshot root<a name="line.193"></a> +<span class="sourceLineNo">194</span> * directory and all the data files for a snapshot are kept under this directory.<a name="line.194"></a> +<span class="sourceLineNo">195</span> * @param snapshotName name of the snapshot being taken<a name="line.195"></a> +<span class="sourceLineNo">196</span> * @param rootDir hbase root directory<a name="line.196"></a> +<span class="sourceLineNo">197</span> * @return the final directory for the completed snapshot<a name="line.197"></a> +<span class="sourceLineNo">198</span> */<a name="line.198"></a> +<span class="sourceLineNo">199</span> public static Path getCompletedSnapshotDir(final String snapshotName, final Path rootDir) {<a name="line.199"></a> +<span class="sourceLineNo">200</span> return getSpecifiedSnapshotDir(getSnapshotsDir(rootDir), snapshotName);<a name="line.200"></a> +<span class="sourceLineNo">201</span> }<a name="line.201"></a> +<span class="sourceLineNo">202</span><a name="line.202"></a> +<span class="sourceLineNo">203</span> /**<a name="line.203"></a> +<span class="sourceLineNo">204</span> * Get the general working directory for snapshots - where they are built, where they are<a name="line.204"></a> +<span class="sourceLineNo">205</span> * temporarily copied on export, etc.<a name="line.205"></a> +<span class="sourceLineNo">206</span> * @param rootDir root directory of the HBase installation<a name="line.206"></a> +<span class="sourceLineNo">207</span> * @param conf Configuration of the HBase instance<a name="line.207"></a> +<span class="sourceLineNo">208</span> * @return Path to the snapshot tmp directory, relative to the passed root directory<a name="line.208"></a> +<span class="sourceLineNo">209</span> */<a name="line.209"></a> +<span class="sourceLineNo">210</span> public static Path getWorkingSnapshotDir(final Path rootDir, final Configuration conf) {<a name="line.210"></a> +<span class="sourceLineNo">211</span> return new Path(conf.get(SNAPSHOT_WORKING_DIR,<a name="line.211"></a> +<span class="sourceLineNo">212</span> getDefaultWorkingSnapshotDir(rootDir).toString()));<a name="line.212"></a> +<span class="sourceLineNo">213</span> }<a name="line.213"></a> +<span class="sourceLineNo">214</span><a name="line.214"></a> +<span class="sourceLineNo">215</span> /**<a name="line.215"></a> +<span class="sourceLineNo">216</span> * Get the directory to build a snapshot, before it is finalized<a name="line.216"></a> +<span class="sourceLineNo">217</span> * @param snapshot snapshot that will be built<a name="line.217"></a> +<span class="sourceLineNo">218</span> * @param rootDir root directory of the hbase installation<a name="line.218"></a> +<span class="sourceLineNo">219</span> * @param conf Configuration of the HBase instance<a name="line.219"></a> +<span class="sourceLineNo">220</span> * @return {@link Path} where one can build a snapshot<a name="line.220"></a> +<span class="sourceLineNo">221</span> */<a name="line.221"></a> +<span class="sourceLineNo">222</span> public static Path getWorkingSnapshotDir(SnapshotDescription snapshot, final Path rootDir,<a name="line.222"></a> +<span class="sourceLineNo">223</span> Configuration conf) {<a name="line.223"></a> +<span class="sourceLineNo">224</span> return getWorkingSnapshotDir(snapshot.getName(), rootDir, conf);<a name="line.224"></a> +<span class="sourceLineNo">225</span> }<a name="line.225"></a> +<span class="sourceLineNo">226</span><a name="line.226"></a> +<span class="sourceLineNo">227</span> /**<a name="line.227"></a> +<span class="sourceLineNo">228</span> * Get the directory to build a snapshot, before it is finalized<a name="line.228"></a> +<span class="sourceLineNo">229</span> * @param snapshotName name of the snapshot<a name="line.229"></a> +<span class="sourceLineNo">230</span> * @param rootDir root directory of the hbase installation<a name="line.230"></a> +<span class="sourceLineNo">231</span> * @param conf Configuration of the HBase instance<a name="line.231"></a> +<span class="sourceLineNo">232</span> * @return {@link Path} where one can build a snapshot<a name="line.232"></a> +<span class="sourceLineNo">233</span> */<a name="line.233"></a> +<span class="sourceLineNo">234</span> public static Path getWorkingSnapshotDir(String snapshotName, final Path rootDir,<a name="line.234"></a> +<span class="sourceLineNo">235</span> Configuration conf) {<a name="line.235"></a> +<span class="sourceLineNo">236</span> return getSpecifiedSnapshotDir(getWorkingSnapshotDir(rootDir, conf), snapshotName);<a name="line.236"></a> +<span class="sourceLineNo">237</span> }<a name="line.237"></a> +<span class="sourceLineNo">238</span><a name="line.238"></a> +<span class="sourceLineNo">239</span> /**<a name="line.239"></a> +<span class="sourceLineNo">240</span> * Get the directory within the given filepath to store the snapshot instance<a name="line.240"></a> +<span class="sourceLineNo">241</span> * @param snapshotsDir directory to store snapshot directory within<a name="line.241"></a> +<span class="sourceLineNo">242</span> * @param snapshotName name of the snapshot to take<a name="line.242"></a> +<span class="sourceLineNo">243</span> * @return the final directory for the snapshot in the given filepath<a name="line.243"></a> +<span class="sourceLineNo">244</span> */<a name="line.244"></a> +<span class="sourceLineNo">245</span> private static final Path getSpecifiedSnapshotDir(final Path snapshotsDir, String snapshotName) {<a name="line.245"></a> +<span class="sourceLineNo">246</span> return new Path(snapshotsDir, snapshotName);<a name="line.246"></a> +<span class="sourceLineNo">247</span> }<a name="line.247"></a> +<span class="sourceLineNo">248</span><a name="line.248"></a> +<span class="sourceLineNo">249</span> /**<a name="line.249"></a> +<span class="sourceLineNo">250</span> * @param rootDir hbase root directory<a name="line.250"></a> +<span class="sourceLineNo">251</span> * @return the directory for all completed snapshots;<a name="line.251"></a> +<span class="sourceLineNo">252</span> */<a name="line.252"></a> +<span class="sourceLineNo">253</span> public static final Path getSnapshotsDir(Path rootDir) {<a name="line.253"></a> +<span class="sourceLineNo">254</span> return new Path(rootDir, HConstants.SNAPSHOT_DIR_NAME);<a name="line.254"></a> +<span class="sourceLineNo">255</span> }<a name="line.255"></a> +<span class="sourceLineNo">256</span><a name="line.256"></a> +<span class="sourceLineNo">257</span> /**<a name="line.257"></a> +<span class="sourceLineNo">258</span> * Determines if the given workingDir is a subdirectory of the given "root directory"<a name="line.258"></a> +<span class="sourceLineNo">259</span> * @param workingDir a directory to check<a name="line.259"></a> +<span class="sourceLineNo">260</span> * @param rootDir root directory of the HBase installation<a name="line.260"></a> +<span class="sourceLineNo">261</span> * @return true if the given workingDir is a subdirectory of the given root directory,<a name="line.261"></a> +<span class="sourceLineNo">262</span> * false otherwise<a name="line.262"></a> +<span class="sourceLineNo">263</span> */<a name="line.263"></a> +<span class="sourceLineNo">264</span> public static boolean isSubDirectoryOf(final Path workingDir, final Path rootDir) {<a name="line.264"></a> +<span class="sourceLineNo">265</span> return workingDir.toString().startsWith(rootDir.toString() + Path.SEPARATOR);<a name="line.265"></a> +<span class="sourceLineNo">266</span> }<a name="line.266"></a> +<span class="sourceLineNo">267</span><a name="line.267"></a> +<span class="sourceLineNo">268</span> /**<a name="line.268"></a> +<span class="sourceLineNo">269</span> * Determines if the given workingDir is a subdirectory of the default working snapshot directory<a name="line.269"></a> +<span class="sourceLineNo">270</span> * @param workingDir a directory to check<a name="line.270"></a> +<span class="sourceLineNo">271</span> * @param conf configuration for the HBase cluster<a name="line.271"></a> +<span class="sourceLineNo">272</span> * @return true if the given workingDir is a subdirectory of the default working directory for<a name="line.272"></a> +<span class="sourceLineNo">273</span> * snapshots, false otherwise<a name="line.273"></a> +<span class="sourceLineNo">274</span> */<a name="line.274"></a> +<span class="sourceLineNo">275</span> public static boolean isWithinDefaultWorkingDir(final Path workingDir, Configuration conf) {<a name="line.275"></a> +<span class="sourceLineNo">276</span> Path defaultWorkingDir = getDefaultWorkingSnapshotDir(new Path(conf.get(HConstants.HBASE_DIR)));<a name="line.276"></a> +<span class="sourceLineNo">277</span> return workingDir.equals(defaultWorkingDir) || isSubDirectoryOf(workingDir, defaultWorkingDir);<a name="line.277"></a> +<span class="sourceLineNo">278</span> }<a name="line.278"></a> +<span class="sourceLineNo">279</span><a name="line.279"></a> +<span class="sourceLineNo">280</span> /**<a name="line.280"></a> +<span class="sourceLineNo">281</span> * Get the default working directory for snapshots - where they are built, where they are<a name="line.281"></a> +<span class="sourceLineNo">282</span> * temporarily copied on export, etc.<a name="line.282"></a> +<span class="sourceLineNo">283</span> * @param rootDir root directory of the HBase installation<a name="line.283"></a> +<span class="sourceLineNo">284</span> * @return Path to the default snapshot tmp directory, relative to the passed root directory<a name="line.284"></a> +<span class="sourceLineNo">285</span> */<a name="line.285"></a> +<span class="sourceLineNo">286</span> private static Path getDefaultWorkingSnapshotDir(final Path rootDir) {<a name="line.286"></a> +<span class="sourceLineNo">287</span> return new Path(getSnapshotsDir(rootDir), SNAPSHOT_TMP_DIR_NAME);<a name="line.287"></a> +<span class="sourceLineNo">288</span> }<a name="line.288"></a> +<span class="sourceLineNo">289</span><a name="line.289"></a> +<span class="sourceLineNo">290</span> /**<a name="line.290"></a> +<span class="sourceLineNo">291</span> * Convert the passed snapshot description into a 'full' snapshot description based on default<a name="line.291"></a> +<span class="sourceLineNo">292</span> * parameters, if none have been supplied. This resolves any 'optional' parameters that aren't<a name="line.292"></a> +<span class="sourceLineNo">293</span> * supplied to their default values.<a name="line.293"></a> +<span class="sourceLineNo">294</span> * @param snapshot general snapshot descriptor<a name="line.294"></a> +<span class="sourceLineNo">295</span> * @param conf Configuration to read configured snapshot defaults if snapshot is not complete<a name="line.295"></a> +<span class="sourceLineNo">296</span> * @return a valid snapshot description<a name="line.296"></a> +<span class="sourceLineNo">297</span> * @throws IllegalArgumentException if the {@link SnapshotDescription} is not a complete<a name="line.297"></a> +<span class="sourceLineNo">298</span> * {@link SnapshotDescription}.<a name="line.298"></a> +<span class="sourceLineNo">299</span> */<a name="line.299"></a> +<span class="sourceLineNo">300</span> public static SnapshotDescription validate(SnapshotDescription snapshot, Configuration conf)<a name="line.300"></a> +<span class="sourceLineNo">301</span> throws IllegalArgumentException, IOException {<a name="line.301"></a> +<span class="sourceLineNo">302</span> if (!snapshot.hasTable()) {<a name="line.302"></a> +<span class="sourceLineNo">303</span> throw new IllegalArgumentException(<a name="line.303"></a> +<span class="sourceLineNo">304</span> "Descriptor doesn't apply to a table, so we can't build it.");<a name="line.304"></a> +<span class="sourceLineNo">305</span> }<a name="line.305"></a> +<span class="sourceLineNo">306</span><a name="line.306"></a> +<span class="sourceLineNo">307</span> // set the creation time, if one hasn't been set<a name="line.307"></a> +<span class="sourceLineNo">308</span> long time = snapshot.getCreationTime();<a name="line.308"></a> +<span class="sourceLineNo">309</span> if (time == SnapshotDescriptionUtils.NO_SNAPSHOT_START_TIME_SPECIFIED) {<a name="line.309"></a> +<span class="sourceLineNo">310</span> time = EnvironmentEdgeManager.currentTime();<a name="line.310"></a> +<span class="sourceLineNo">311</span> LOG.debug("Creation time not specified, setting to:" + time + " (current time:"<a name="line.311"></a> +<span class="sourceLineNo">312</span> + EnvironmentEdgeManager.currentTime() + ").");<a name="line.312"></a> +<span class="sourceLineNo">313</span> SnapshotDescription.Builder builder = snapshot.toBuilder();<a name="line.313"></a> +<span class="sourceLineNo">314</span> builder.setCreationTime(time);<a name="line.314"></a> +<span class="sourceLineNo">315</span> snapshot = builder.build();<a name="line.315"></a> +<span class="sourceLineNo">316</span> }<a name="line.316"></a> +<span class="sourceLineNo">317</span><a name="line.317"></a> +<span class="sourceLineNo">318</span> // set the acl to snapshot if security feature is enabled.<a name="line.318"></a> +<span class="sourceLineNo">319</span> if (isSecurityAvailable(conf)) {<a name="line.319"></a> +<span class="sourceLineNo">320</span> snapshot = writeAclToSnapshotDescription(snapshot, conf);<a name="line.320"></a> +<span class="sourceLineNo">321</span> }<a name="line.321"></a> +<span class="sourceLineNo">322</span> return snapshot;<a name="line.322"></a> +<span class="sourceLineNo">323</span> }<a name="line.323"></a> +<span class="sourceLineNo">324</span><a name="line.324"></a> +<span class="sourceLineNo">325</span> /**<a name="line.325"></a> +<span class="sourceLineNo">326</span> * Write the snapshot description into the working directory of a snapshot<a name="line.326"></a> +<span class="sourceLineNo">327</span> * @param snapshot description of the snapshot being taken<a name="line.327"></a> +<span class="sourceLineNo">328</span> * @param workingDir working directory of the snapshot<a name="line.328"></a> +<span class="sourceLineNo">329</span> * @param fs {@link FileSystem} on which the snapshot should be taken<a name="line.329"></a> +<span class="sourceLineNo">330</span> * @throws IOException if we can't reach the filesystem and the file cannot be cleaned up on<a name="line.330"></a> +<span class="sourceLineNo">331</span> * failure<a name="line.331"></a> +<span class="sourceLineNo">332</span> */<a name="line.332"></a> +<span class="sourceLineNo">333</span> public static void writeSnapshotInfo(SnapshotDescription snapshot, Path workingDir, FileSystem fs)<a name="line.333"></a> +<span class="sourceLineNo">334</span> throws IOException {<a name="line.334"></a> +<span class="sourceLineNo">335</span> FsPermission perms = FSUtils.getFilePermissions(fs, fs.getConf(),<a name="line.335"></a> +<span class="sourceLineNo">336</span> HConstants.DATA_FILE_UMASK_KEY);<a name="line.336"></a> +<span class="sourceLineNo">337</span> Path snapshotInfo = new Path(workingDir, SnapshotDescriptionUtils.SNAPSHOTINFO_FILE);<a name="line.337"></a> +<span class="sourceLineNo">338</span> try {<a name="line.338"></a> +<span class="sourceLineNo">339</span> FSDataOutputStream out = FSUtils.create(fs, snapshotInfo, perms, true);<a name="line.339"></a> +<span class="sourceLineNo">340</span> try {<a name="line.340"></a> +<span class="sourceLineNo">341</span> snapshot.writeTo(out);<a name="line.341"></a> +<span class="sourceLineNo">342</span> } finally {<a name="line.342"></a> +<span class="sourceLineNo">343</span> out.close();<a name="line.343"></a> +<span class="sourceLineNo">344</span> }<a name="line.344"></a> +<span class="sourceLineNo">345</span> } catch (IOException e) {<a name="line.345"></a> +<span class="sourceLineNo">346</span> // if we get an exception, try to remove the snapshot info<a name="line.346"></a> +<span class="sourceLineNo">347</span> if (!fs.delete(snapshotInfo, false)) {<a name="line.347"></a> +<span class="sourceLineNo">348</span> String msg = "Couldn't delete snapshot info file: " + snapshotInfo;<a name="line.348"></a> +<span class="sourceLineNo">349</span> LOG.error(msg);<a name="line.349"></a> +<span class="sourceLineNo">350</span> throw new IOException(msg);<a name="line.350"></a> +<span class="sourceLineNo">351</span> }<a name="line.351"></a> +<span class="sourceLineNo">352</span> }<a name="line.352"></a> +<span class="sourceLineNo">353</span> }<a name="line.353"></a> +<span class="sourceLineNo">354</span><a name="line.354"></a> +<span class="sourceLineNo">355</span> /**<a name="line.355"></a> +<span class="sourceLineNo">356</span> * Read in the {@link org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription} stored for the snapshot in the passed directory<a name="line.356"></a> +<span class="sourceLineNo">357</span> * @param fs filesystem where the snapshot was taken<a name="line.357"></a> +<span class="sourceLineNo">358</span> * @param snapshotDir directory where the snapshot was stored<a name="line.358"></a> +<span class="sourceLineNo">359</span> * @return the stored snapshot description<a name="line.359"></a> +<span class="sourceLineNo">360</span> * @throws CorruptedSnapshotException if the<a name="line.360"></a> +<span class="sourceLineNo">361</span> * snapshot cannot be read<a name="line.361"></a> +<span class="sourceLineNo">362</span> */<a name="line.362"></a> +<span class="sourceLineNo">363</span> public static SnapshotDescription readSnapshotInfo(FileSystem fs, Path snapshotDir)<a name="line.363"></a> +<span class="sourceLineNo">364</span> throws CorruptedSnapshotException {<a name="line.364"></a> +<span class="sourceLineNo">365</span> Path snapshotInfo = new Path(snapshotDir, SNAPSHOTINFO_FILE);<a name="line.365"></a> +<span class="sourceLineNo">366</span> try {<a name="line.366"></a> +<span class="sourceLineNo">367</span> FSDataInputStream in = null;<a name="line.367"></a> +<span class="sourceLineNo">368</span> try {<a name="line.368"></a> +<span class="sourceLineNo">369</span> in = fs.open(snapshotInfo);<a name="line.369"></a> +<span class="sourceLineNo">370</span> SnapshotDescription desc = SnapshotDescription.parseFrom(in);<a name="line.370"></a> +<span class="sourceLineNo">371</span> return desc;<a name="line.371"></a> +<span class="sourceLineNo">372</span> } finally {<a name="line.372"></a> +<span class="sourceLineNo">373</span> if (in != null) in.close();<a name="line.373"></a> +<span class="sourceLineNo">374</span> }<a name="line.374"></a> +<span class="sourceLineNo">375</span> } catch (IOException e) {<a name="line.375"></a> +<span class="sourceLineNo">376</span> throw new CorruptedSnapshotException("Couldn't read snapshot info from:" + snapshotInfo, e);<a name="line.376"></a> +<span class="sourceLineNo">377</span> }<a name="line.377"></a> +<span class="sourceLineNo">378</span> }<a name="line.378"></a> +<span class="sourceLineNo">379</span><a name="line.379"></a> +<span class="sourceLineNo">380</span> /**<a name="line.380"></a> +<span class="sourceLineNo">381</span> * Move the finished snapshot to its final, publicly visible directory - this marks the snapshot<a name="line.381"></a> +<span class="sourceLineNo">382</span> * as 'complete'.<a name="line.382"></a> +<span class="sourceLineNo">383</span> * @param snapshot description of the snapshot being tabken<a name="line.383"></a> +<span class="sourceLineNo">384</span> * @param rootdir root directory of the hbase installation<a name="line.384"></a> +<span class="sourceLineNo">385</span> * @param workingDir directory where the in progress snapshot was built<a name="line.385"></a> +<span class="sourceLineNo">386</span> * @param fs {@link FileSystem} where the snapshot was built<a name="line.386"></a> +<span class="sourceLineNo">387</span> * @throws org.apache.hadoop.hbase.snapshot.SnapshotCreationException if the<a name="line.387"></a> +<span class="sourceLineNo">388</span> * snapshot could not be moved<a name="line.388"></a> +<span class="sourceLineNo">389</span> * @throws IOException the filesystem could not be reached<a name="line.389"></a> +<span class="sourceLineNo">390</span> */<a name="line.390"></a> +<span class="sourceLineNo">391</span> public static void completeSnapshot(SnapshotDescription snapshot, Path rootdir, Path workingDir,<a name="line.391"></a> +<span class="sourceLineNo">392</span> FileSystem fs) throws SnapshotCreationException, IOException {<a name="line.392"></a> +<span class="sourceLineNo">393</span> Path finishedDir = getCompletedSnapshotDir(snapshot, rootdir);<a name="line.393"></a> +<span class="sourceLineNo">394</span> LOG.debug("Snapshot is done, just moving the snapshot from " + workingDir + " to "<a name="line.394"></a> +<span class="sourceLineNo">395</span> + finishedDir);<a name="line.395"></a> +<span class="sourceLineNo">396</span> if (!fs.rename(workingDir, finishedDir)) {<a name="line.396"></a> +<span class="sourceLineNo">397</span> throw new SnapshotCreationException(<a name="line.397"></a> +<span class="sourceLineNo">398</span> "Failed to move working directory(" + workingDir + ") to completed directory("<a name="line.398"></a> +<span class="sourceLineNo">399</span> + finishedDir + ").", ProtobufUtil.createSnapshotDesc(snapshot));<a name="line.399"></a> +<span class="sourceLineNo">400</span> }<a name="line.400"></a> +<span class="sourceLineNo">401</span> }<a name="line.401"></a> +<span class="sourceLineNo">402</span><a name="line.402"></a> +<span class="sourceLineNo">403</span> /**<a name="line.403"></a> +<span class="sourceLineNo">404</span> * Check if the user is this table snapshot's owner<a name="line.404"></a> +<span class="sourceLineNo">405</span> * @param snapshot the table snapshot description<a name="line.405"></a> +<span class="sourceLineNo">406</span> * @param user the user<a name="line.406"></a> +<span class="sourceLineNo">407</span> * @return true if the user is the owner of the snapshot,<a name="line.407"></a> +<span class="sourceLineNo">408</span> * false otherwise or the snapshot owner field is not present.<a name="line.408"></a> +<span class="sourceLineNo">409</span> */<a name="line.409"></a> +<span class="sourceLineNo">410</span> public static boolean isSnapshotOwner(org.apache.hadoop.hbase.client.SnapshotDescription snapshot,<a name="line.410"></a> +<span class="sourceLineNo">411</span> User user) {<a name="line.411"></a> +<span class="sourceLineNo">412</span> if (user == null) return false;<a name="line.412"></a> +<span class="sourceLineNo">413</span> return user.getShortName().equals(snapshot.getOwner());<a name="line.413"></a> +<span class="sourceLineNo">414</span> }<a name="line.414"></a> +<span class="sourceLineNo">415</span><a name="line.415"></a> +<span class="sourceLineNo">416</span> public static boolean isSecurityAvailable(Configuration conf) throws IOException {<a name="line.416"></a> +<span class="sourceLineNo">417</span> try (Connection conn = ConnectionFactory.createConnection(conf)) {<a name="line.417"></a> +<span class="sourceLineNo">418</span> try (Admin admin = conn.getAdmin()) {<a name="line.418"></a> +<span class="sourceLineNo">419</span> return admin.tableExists(AccessControlLists.ACL_TABLE_NAME);<a name="line.419"></a> +<span class="sourceLineNo">420</span> }<a name="line.420"></a> +<span class="sourceLineNo">421</span> }<a name="line.421"></a> +<span class="sourceLineNo">422</span> }<a name="line.422"></a> +<span class="sourceLineNo">423</span><a name="line.423"></a> +<span class="sourceLineNo">424</span> private static SnapshotDescription writeAclToSnapshotDescription(SnapshotDescription snapshot,<a name="line.424"></a> +<span class="sourceLineNo">425</span> Configuration conf) throws IOException {<a name="line.425"></a> +<span class="sourceLineNo">426</span> ListMultimap<String, UserPermission> perms =<a name="line.426"></a> +<span class="sourceLineNo">427</span> User.runAsLoginUser(new PrivilegedExceptionAction<ListMultimap<String, UserPermission>>() {<a name="line.427"></a> +<span class="sourceLineNo">428</span> @Override<a name="line.428"></a> +<span class="sourceLineNo">429</span> public ListMultimap<String, UserPermission> run() throws Exception {<a name="line.429"></a> +<span class="sourceLineNo">430</span> return AccessControlLists.getTablePermissions(conf,<a name="line.430"></a> +<span class="sourceLineNo">431</span> TableName.valueOf(snapshot.getTable()));<a name="line.431"></a> +<span class="sourceLineNo">432</span> }<a name="line.432"></a> +<span class="sourceLineNo">433</span> });<a name="line.433"></a> +<span class="sourceLineNo">434</span> return snapshot.toBuilder()<a name="line.434"></a> +<span class="sourceLineNo">435</span> .setUsersAndPermissions(ShadedAccessControlUtil.toUserTablePermissions(perms)).build();<a name="line.435"></a> +<span class="sourceLineNo">436</span> }<a name="line.436"></a> +<span class="sourceLineNo">437</span>}<a name="line.437"></a>
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/downloads.html ---------------------------------------------------------------------- diff --git a/downloads.html b/downloads.html index 5ec8a45..cd52d30 100644 --- a/downloads.html +++ b/downloads.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Apache HBase Downloads</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" /> @@ -461,7 +461,7 @@ under the License. --> <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/export_control.html ---------------------------------------------------------------------- diff --git a/export_control.html b/export_control.html index b718e6e..8340c5b 100644 --- a/export_control.html +++ b/export_control.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Export Control @@ -341,7 +341,7 @@ for more details.</p> <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/index.html ---------------------------------------------------------------------- diff --git a/index.html b/index.html index 8c9825e..9450a30 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Apache HBase⢠Home</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" /> @@ -421,7 +421,7 @@ Apache HBase is an open-source, distributed, versioned, non-relational database <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/integration.html ---------------------------------------------------------------------- diff --git a/integration.html b/integration.html index f62b6eb..4aae16e 100644 --- a/integration.html +++ b/integration.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – CI Management</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" /> @@ -301,7 +301,7 @@ <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/issue-tracking.html ---------------------------------------------------------------------- diff --git a/issue-tracking.html b/issue-tracking.html index 60cd1fa..7acbc21 100644 --- a/issue-tracking.html +++ b/issue-tracking.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Issue Management</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" /> @@ -298,7 +298,7 @@ <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/license.html ---------------------------------------------------------------------- diff --git a/license.html b/license.html index ab4a29d..c6f0166 100644 --- a/license.html +++ b/license.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Project Licenses</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" /> @@ -501,7 +501,7 @@ <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/mail-lists.html ---------------------------------------------------------------------- diff --git a/mail-lists.html b/mail-lists.html index 5e60ec9..9dd8201 100644 --- a/mail-lists.html +++ b/mail-lists.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Project Mailing Lists</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" /> @@ -351,7 +351,7 @@ <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/metrics.html ---------------------------------------------------------------------- diff --git a/metrics.html b/metrics.html index fcfd43e..4d88112 100644 --- a/metrics.html +++ b/metrics.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Apache HBase (TM) Metrics @@ -469,7 +469,7 @@ export HBASE_REGIONSERVER_OPTS="$HBASE_JMX_OPTS -Dcom.sun.management.jmxrem <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/old_news.html ---------------------------------------------------------------------- diff --git a/old_news.html b/old_news.html index 20487f5..4b9c6ae 100644 --- a/old_news.html +++ b/old_news.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Old Apache HBase (TM) News @@ -450,7 +450,7 @@ under the License. --> <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/plugin-management.html ---------------------------------------------------------------------- diff --git a/plugin-management.html b/plugin-management.html index 6c823bf..98cd0f0 100644 --- a/plugin-management.html +++ b/plugin-management.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Project Plugin Management</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" /> @@ -450,7 +450,7 @@ <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/plugins.html ---------------------------------------------------------------------- diff --git a/plugins.html b/plugins.html index 7ef6f28..b004e42 100644 --- a/plugins.html +++ b/plugins.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Project Plugins</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" /> @@ -381,7 +381,7 @@ <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/poweredbyhbase.html ---------------------------------------------------------------------- diff --git a/poweredbyhbase.html b/poweredbyhbase.html index c8c4378..0f5d067 100644 --- a/poweredbyhbase.html +++ b/poweredbyhbase.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Powered By Apache HBaseÂ</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" /> @@ -779,7 +779,7 @@ under the License. --> <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/project-info.html ---------------------------------------------------------------------- diff --git a/project-info.html b/project-info.html index 8e6866a..761f1f9 100644 --- a/project-info.html +++ b/project-info.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Project Information</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" /> @@ -345,7 +345,7 @@ <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/project-reports.html ---------------------------------------------------------------------- diff --git a/project-reports.html b/project-reports.html index cd7d9d5..cc98a59 100644 --- a/project-reports.html +++ b/project-reports.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Generated Reports</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" /> @@ -315,7 +315,7 @@ <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/project-summary.html ---------------------------------------------------------------------- diff --git a/project-summary.html b/project-summary.html index 2c0041a..94c2c4d 100644 --- a/project-summary.html +++ b/project-summary.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Project Summary</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" /> @@ -341,7 +341,7 @@ <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/pseudo-distributed.html ---------------------------------------------------------------------- diff --git a/pseudo-distributed.html b/pseudo-distributed.html index 2d4a02f..11ec627 100644 --- a/pseudo-distributed.html +++ b/pseudo-distributed.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Running Apache HBase (TM) in pseudo-distributed mode @@ -318,7 +318,7 @@ under the License. --> <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/replication.html ---------------------------------------------------------------------- diff --git a/replication.html b/replication.html index 52229e0..fe65afe 100644 --- a/replication.html +++ b/replication.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Apache HBase (TM) Replication @@ -313,7 +313,7 @@ under the License. --> <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/resources.html ---------------------------------------------------------------------- diff --git a/resources.html b/resources.html index 71b16aa..5db8f8c 100644 --- a/resources.html +++ b/resources.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Other Apache HBase (TM) Resources</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" /> @@ -341,7 +341,7 @@ under the License. --> <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div> http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3353a0ac/source-repository.html ---------------------------------------------------------------------- diff --git a/source-repository.html b/source-repository.html index a2fb6cc..2fb1ba6 100644 --- a/source-repository.html +++ b/source-repository.html @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="Date-Revision-yyyymmdd" content="20181121" /> + <meta name="Date-Revision-yyyymmdd" content="20181123" /> <meta http-equiv="Content-Language" content="en" /> <title>Apache HBase – Source Code Management</title> <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" /> @@ -309,7 +309,7 @@ <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li> + <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li> </p> </div>
