Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZOOKEEPER-3411 Remove deprecated ls2 and rmr command #1175

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions zookeeper-docs/src/main/resources/markdown/zookeeperCLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@ ZooKeeper -server host:port cmd args
history
listquota path
ls [-s] [-w] [-R] path
ls2 path [watch]
printwatches on|off
quit
reconfig [-s] [-v version] [[-file path] | [-members serverID=host:port1:port2;port3[,...]*]] | [-add serverId=host:port1:port2;port3[,...]]* [-remove serverId[,...]*]
redo cmdno
removewatches path [-c|-d|-a] [-l]
rmr path
set [-s] [-v version] path data
setAcl [-s] [-v version] [-R] path acl
setquota -n|-b val path
Expand Down Expand Up @@ -324,15 +322,6 @@ Listing the child nodes of one path
WatchedEvent state:SyncConnected type:NodeChildrenChanged path:/brokers
```

## ls2

'ls2' has been deprecated. Please use 'ls [-s] path' instead.

```bash
[zkshell: 7] ls2 /
'ls2' has been deprecated. Please use 'ls [-s] path' instead.
```

## printwatches
A switch to turn on/off whether printing watches or not.

Expand Down Expand Up @@ -422,14 +411,6 @@ Remove the watches under a node.

```

## rmr
The command 'rmr' has been deprecated. Please use 'deleteall' instead.

```bash
[zkshell: 4] rmr /zk-latencies4
The command 'rmr' has been deprecated. Please use 'deleteall' instead
```

## set
Set/update the data on a path.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
import org.apache.zookeeper.cli.GetConfigCommand;
import org.apache.zookeeper.cli.GetEphemeralsCommand;
import org.apache.zookeeper.cli.ListQuotaCommand;
import org.apache.zookeeper.cli.Ls2Command;
import org.apache.zookeeper.cli.LsCommand;
import org.apache.zookeeper.cli.MalformedCommandException;
import org.apache.zookeeper.cli.ReconfigCommand;
Expand Down Expand Up @@ -105,12 +104,9 @@ public boolean getPrintWatches() {
new CreateCommand().addToMap(commandMapCli);
new DeleteCommand().addToMap(commandMapCli);
new DeleteAllCommand().addToMap(commandMapCli);
// Depricated: rmr
new DeleteAllCommand("rmr").addToMap(commandMapCli);
new SetCommand().addToMap(commandMapCli);
new GetCommand().addToMap(commandMapCli);
new LsCommand().addToMap(commandMapCli);
new Ls2Command().addToMap(commandMapCli);
new GetAclCommand().addToMap(commandMapCli);
new SetAclCommand().addToMap(commandMapCli);
new StatCommand().addToMap(commandMapCli);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public CliCommand parse(String[] cmdArgs) throws CliParseException {

@Override
public boolean exec() throws CliException {
printDeprecatedWarning();
int batchSize;
try {
batchSize = cl.hasOption("b") ? Integer.parseInt(cl.getOptionValue("b")) : 1000;
Expand All @@ -88,10 +87,4 @@ public boolean exec() throws CliException {
return false;
}

private void printDeprecatedWarning() {
if ("rmr".equals(args[0])) {
err.println("The command 'rmr' has been deprecated. " + "Please use 'deleteall' instead.");
}
}

}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,7 @@ public void testDeleteRecursiveCli() throws IOException, InterruptedException, C
assertTrue(children.contains("c"));

ZooKeeperMain zkMain = new ZooKeeperMain(zk);
// 'rmr' is deprecated, so the test here is just for backwards
// compatibility.
String cmdstring0 = "rmr /a/b/v";
String cmdstring1 = "deleteall /a";
zkMain.cl.parseCommand(cmdstring0);
assertFalse(zkMain.processZKCmd(zkMain.cl));
assertEquals(null, zk.exists("/a/b/v", null));
zkMain.cl.parseCommand(cmdstring1);
assertFalse(zkMain.processZKCmd(zkMain.cl));
assertNull(zk.exists("/a", null));
Expand Down