1
package org.apache.bookkeeper.util;
5
* Licensed to the Apache Software Foundation (ASF) under one
6
* or more contributor license agreements. See the NOTICE file
7
* distributed with this work for additional information
8
* regarding copyright ownership. The ASF licenses this file
9
* to you under the Apache License, Version 2.0 (the
10
* "License"); you may not use this file except in compliance
11
* with the License. You may obtain a copy of the License at
13
* http://www.apache.org/licenses/LICENSE-2.0
15
* Unless required by applicable law or agreed to in writing,
16
* software distributed under the License is distributed on an
17
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18
* KIND, either express or implied. See the License for the
19
* specific language governing permissions and limitations
24
import java.io.IOException;
26
import org.apache.bookkeeper.proto.BookieClient;
27
import org.apache.bookkeeper.proto.BookieServer;
32
System.err.println("USAGE: bookeeper client|bookie");
37
* @throws InterruptedException
40
public static void main(String[] args) throws IOException, InterruptedException {
41
if (args.length < 1 || !(args[0].equals("client") || args[0].equals("bookie"))) {
45
String newArgs[] = new String[args.length - 1];
46
System.arraycopy(args, 1, newArgs, 0, newArgs.length);
47
if (args[0].equals("bookie")) {
48
BookieServer.main(newArgs);
50
BookieClient.main(newArgs);