@Override
  protected void processOptions(CommandLine cmd) {
    this.tableName = TableName.valueOf(cmd.getOptionValue('t'));
    this.snapshotName = cmd.getOptionValue('n');
    String snapshotTypeName = cmd.getOptionValue('s');
    if (snapshotTypeName != null) {
      snapshotTypeName = snapshotTypeName.toUpperCase(Locale.ROOT);
      this.snapshotType = SnapshotType.valueOf(snapshotTypeName);
    }
  }
This is a command line class that will snapshot a given table.
hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/CreateSnapshot.java