All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hbase-webapps.master.snapshotsStats.jsp Maven / Gradle / Ivy

There is a newer version: 3.0.0-beta-1
Show newest version
<%--
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
--%>
<%@ page contentType="text/html;charset=UTF-8"
  import="java.util.concurrent.atomic.AtomicLong"
  import="java.util.Date"
  import="java.util.List"
  import="java.util.Map"
  import="org.apache.hadoop.conf.Configuration"
  import="org.apache.hadoop.fs.Path"
  import="org.apache.hadoop.hbase.master.HMaster"
  import="org.apache.hadoop.hbase.snapshot.SnapshotInfo"
  import="org.apache.hadoop.hbase.TableName"
  import="org.apache.hadoop.util.StringUtils"
  import="org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription"
%>
<%
  HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER);
  Configuration conf = master.getConfiguration();
  AtomicLong totalSharedSize = new AtomicLong();
  AtomicLong totalArchivedSize = new AtomicLong();
  AtomicLong totalMobSize = new AtomicLong();
  long totalSize = 0;
  long totalUnsharedArchivedSize = 0;

  Map filesMap = null;

  List snapshots = master.isInitialized() ?
    master.getSnapshotManager().getCompletedSnapshots() : null;

  if (snapshots != null && snapshots.size() > 0) {
    filesMap = SnapshotInfo.getSnapshotsFilesMap(master.getConfiguration(),
                   totalArchivedSize, totalSharedSize, totalMobSize);
    totalSize = totalSharedSize.get() + totalArchivedSize.get() + totalMobSize.get();
  }
  pageContext.setAttribute("pageTitle", "HBase Master Snapshots: " + master.getServerName());
%>

    

<%for (SnapshotDescription snapshotDesc : snapshots) { %> <% TableName snapshotTable = TableName.valueOf(snapshotDesc.getTable()); SnapshotInfo.SnapshotStats stats = SnapshotInfo.getSnapshotStats(master.getConfiguration(), snapshotDesc, filesMap); totalUnsharedArchivedSize += stats.getNonSharedArchivedStoreFilesSize(); %> <% } %>

<%= snapshots.size() %> snapshot(s) in set.

Total Storefile Size: <%= StringUtils.humanReadableInt(totalSize) %>

Total Shared Storefile Size: <%= StringUtils.humanReadableInt(totalSharedSize.get()) %>, Total Mob Storefile Size: <%= StringUtils.humanReadableInt(totalMobSize.get()) %>, Total Archived Storefile Size: <%= StringUtils.humanReadableInt(totalArchivedSize.get()) %> (<%= StringUtils.humanReadableInt(totalUnsharedArchivedSize) %>)

Shared Storefile Size is the Storefile size shared between snapshots and active tables. Mob Storefile Size is the Mob Storefile size shared between snapshots and active tables. Archived Storefile Size is the Storefile size in Archive. The format of Archived Storefile Size is NNN(MMM). NNN is the total Storefile size in Archive, MMM is the total Storefile size in Archive that is specific to the snapshot (not shared with other snapshots and tables)

Snapshot Name Table Creation Time TTL(Sec) Shared Storefile Size Mob Storefile Size Archived Storefile Size
<%= snapshotDesc.getName() %> <%= snapshotTable.getNameAsString() %> <%= new Date(snapshotDesc.getCreationTime()) %> <% if (snapshotDesc.getTtl() == 0) { %> FOREVER <% } else { %> <%= snapshotDesc.getTtl() %> <% } %> <%= StringUtils.humanReadableInt(stats.getSharedStoreFilesSize()) %> <%= StringUtils.humanReadableInt(stats.getMobStoreFilesSize()) %> <%= StringUtils.humanReadableInt(stats.getArchivedStoreFileSize()) %> (<%= StringUtils.humanReadableInt(stats.getNonSharedArchivedStoreFilesSize()) %>)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy