Commit 87023924 authored by Mahadev Konar's avatar Mahadev Konar
Browse files

ZOOKEEPER-82. Make the ZooKeeperServer more DI friendly. (Hiram Chirino via mahadev)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/zookeeper/trunk@686284 13f79535-47bb-0310-9956-ffa450edef68
parent 888940a8
......@@ -11,7 +11,7 @@ Starting the server:
2) start the server with the following comand line:
java -cp zookeeper-dev.jar:java/lib/log4j-1.2.15.jar org.apache.zookeeper.server.quorum.QuorumPeer conf/zoo.cfg
java -cp conf:zookeeper-dev.jar:src/java/lib/log4j-1.2.15.jar org.apache.zookeeper.server.quorum.QuorumPeerMain conf/zoo.cfg
Notice that the server is picking up the log4j.properties file from the conf directory (default).
......@@ -21,8 +21,8 @@ Starting a client shell
1) run the following command
java -cp zookeeper-dev.jar:java/lib/log4j-1.2.15.jar org.apache.zookeeper.ZooKeeper <server>:<port>
java -cp conf:zookeeper-dev.jar:src/java/lib/log4j-1.2.15.jar org.apache.zookeeper.ZooKeeperMain <server>:<port>
where server and port correspond to the ZooKeeper configuration.
Notice that the client is picking up the log4j_console.properties file from the conf directory (default).
Notice that the client is picking up the log4j.properties file from the conf directory (default).
......@@ -34,4 +34,4 @@ eval `grep -e "^dataDir=" $ZOOCFG`
java "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
-cp $CLASSPATH $JVMFLAGS \
org.apache.zookeeper.ZooKeeper $@
org.apache.zookeeper.ZooKeeperMain $@
......@@ -30,7 +30,7 @@ case $1 in
start)
echo -n "Starting zookeeper ... "
java "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
-cp $CLASSPATH $JVMFLAGS org.apache.zookeeper.server.quorum.QuorumPeer $ZOOCFG &
-cp $CLASSPATH $JVMFLAGS org.apache.zookeeper.server.quorum.QuorumPeerMain $ZOOCFG &
echo STARTED
;;
stop)
......
......@@ -24,21 +24,32 @@ import java.util.Date;
import org.apache.zookeeper.Version;
import org.apache.zookeeper.jmx.ZKMBeanInfo;
import org.apache.zookeeper.server.ServerConfig;
import org.apache.zookeeper.server.ServerStats;
import org.apache.zookeeper.server.ZooKeeperServer;
/**
* This class implements the zookeeper server MBean interface.
*/
public class ZooKeeperServerBean implements ZooKeeperServerMXBean, ZKMBeanInfo {
private Date startTime=new Date();
private ZooKeeperServer zooKeeperServer;
public ZooKeeperServerBean() {
}
public ZooKeeperServerBean(ZooKeeperServer zooKeeperServer) {
this.zooKeeperServer = zooKeeperServer;
}
public String getClientPort() {
ZooKeeperServer zks = getZooKeeperServer();
if( zks == null ) {
return null;
}
try {
return InetAddress.getLocalHost().getHostAddress() + ":"
+ ServerConfig.getClientPort();
+ zks.getClientPort();
} catch (UnknownHostException e) {
return "localhost:" + ServerConfig.getClientPort();
return "localhost:" + zks.getClientPort();
}
}
......@@ -94,4 +105,13 @@ public class ZooKeeperServerBean implements ZooKeeperServerMXBean, ZKMBeanInfo {
ServerStats.getInstance().resetRequestCounters();
ServerStats.getInstance().resetLatency();
}
public ZooKeeperServer getZooKeeperServer() {
return zooKeeperServer;
}
public void setZooKeeperServer(ZooKeeperServer zooKeeperServer) {
this.zooKeeperServer = zooKeeperServer;
}
}
......@@ -19,6 +19,7 @@
package org.apache.zookeeper.jmx.server.quorum;
import org.apache.zookeeper.jmx.server.ZooKeeperServerBean;
import org.apache.zookeeper.server.ZooKeeperServer;
import org.apache.zookeeper.server.quorum.QuorumPeer;
/**
......@@ -45,4 +46,8 @@ public class LocalPeerBean extends ZooKeeperServerBean implements LocalPeerMXBea
peer.getQuorumAddress().getPort();
}
@Override
public ZooKeeperServer getZooKeeperServer() {
return peer.getActiveServer();
}
}
......@@ -28,6 +28,7 @@ import org.apache.zookeeper.jmx.MBeanRegistry;
import org.apache.zookeeper.jmx.server.ConnectionBean;
import org.apache.zookeeper.jmx.server.DataTreeBean;
import org.apache.zookeeper.jmx.server.ZooKeeperServerBean;
import org.apache.zookeeper.server.ZooKeeperServer.DataTreeBuilder;
import org.apache.zookeeper.server.util.ConnectionObserver;
import org.apache.zookeeper.server.util.ObserverManager;
import org.apache.zookeeper.server.util.ServerObserver;
......@@ -71,7 +72,7 @@ public class ManagedZooKeeperServer extends ObservableZooKeeperServer {
public void onStartup(ZooKeeperServer server) {
try {
svrBean = new ZooKeeperServerBean();
svrBean = new ZooKeeperServerBean(server);
MBeanRegistry.getInstance().register(svrBean, null);
dataTreeBean = new DataTreeBean(server.dataTree);
MBeanRegistry.getInstance().register(dataTreeBean, svrBean);
......@@ -104,37 +105,22 @@ public class ManagedZooKeeperServer extends ObservableZooKeeperServer {
}
}
public ManagedZooKeeperServer(File dataDir, File dataLogDir,
int tickTime,DataTreeBuilder treeBuilder) throws IOException {
super(dataDir, dataLogDir, tickTime,treeBuilder);
public ManagedZooKeeperServer() {
super();
ObserverManager.getInstance().add(new ManagedServerObserver());
ObserverManager.getInstance().add(new ManagedConnectionObserver());
}
public ManagedZooKeeperServer(DataTreeBuilder treeBuilder) throws IOException {
super(treeBuilder);
public ManagedZooKeeperServer(File dataDir, File dataLogDir, int tickTime, DataTreeBuilder treeBuilder) throws IOException {
super(dataDir, dataLogDir, tickTime, treeBuilder);
ObserverManager.getInstance().add(new ManagedServerObserver());
ObserverManager.getInstance().add(new ManagedConnectionObserver());
}
/**
* To start the server specify the client port number and the data directory
* on the command line.
* @see ServerConfig#parse(String[])
* @param args command line parameters.
*/
public static void main(String[] args) {
ServerConfig.parse(args);
ZooKeeperObserverManager.setAsConcrete();
runStandalone(new Factory() {
public NIOServerCnxn.Factory createConnectionFactory()throws IOException {
return new ObservableNIOServerCnxn.Factory(getClientPort());
}
public ZooKeeperServer createServer() throws IOException {
// TODO: we may want to build an observable/managed data tree here instead
return new ManagedZooKeeperServer(new BasicDataTreeBuilder());
}
});
public ManagedZooKeeperServer(File dataDir, File dataLogDir, int tickTime) throws IOException {
super(dataDir, dataLogDir, tickTime);
ObserverManager.getInstance().add(new ManagedServerObserver());
ObserverManager.getInstance().add(new ManagedConnectionObserver());
}
}
/**
* 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.
*/
package org.apache.zookeeper.server;
import static org.apache.zookeeper.server.ServerConfig.getClientPort;
import java.io.File;
import java.io.IOException;
import org.apache.log4j.Logger;
import org.apache.zookeeper.jmx.server.ConnectionMXBean;
import org.apache.zookeeper.jmx.server.DataTreeMXBean;
import org.apache.zookeeper.jmx.server.ZooKeeperServerMXBean;
import org.apache.zookeeper.server.util.ZooKeeperObserverManager;
/**
* This class launches a standalone zookeeper server with JMX support
* enabled. The users can connect to the server JVM and manage the server state
* (such as currently open client connections) and view runtime statistics using
* one of existing GUI JMX consoles (jconsole, for example). Please refer to
* the JDK vendor documentation for further information on how to enable JMX
* support in the JVM.
* <p>
* The server provides following MBeans:
* <ul>
* <li>Zookeeper server MBean -- provides various configuraton data and runtime
* statistics, see {@link ZooKeeperServerMXBean}
* <li>Data tree MBean -- provides runtime data tree statistics, see
* {@link DataTreeMXBean}
* <li>Client connection MBean -- provides runtime statistics as well as
* connection management operations, see {@link ConnectionMXBean}
* </ul>
* The client connection is a dynamic resource and therefore the connection
* MBeans are dynamically created and destroyed as the clients connect to and
* disconnect from the server.
*/
public class ManagedZooKeeperServerMain extends ZooKeeperServerMain {
/**
* To start the server specify the client port number and the data directory
* on the command line.
* @see ServerConfig#parse(String[])
* @param args command line parameters.
*/
public static void main(String[] args) {
ServerConfig.parse(args);
ZooKeeperObserverManager.setAsConcrete();
runStandalone(new ZooKeeperServer.Factory() {
public NIOServerCnxn.Factory createConnectionFactory()throws IOException {
return new ObservableNIOServerCnxn.Factory(getClientPort());
}
public ZooKeeperServer createServer() throws IOException {
ManagedZooKeeperServer zks = new ManagedZooKeeperServer();
zks.setDataDir(new File(ServerConfig.getDataDir()));
zks.setDataLogDir(new File(ServerConfig.getDataLogDir()));
zks.setClientPort(ServerConfig.getClientPort());
// TODO: we may want to build an observable/managed data tree here instead
zks.setTreeBuilder(new ZooKeeperServer.BasicDataTreeBuilder());
return zks;
}
});
}
}
......@@ -20,6 +20,8 @@ package org.apache.zookeeper.server;
import java.io.File;
import java.io.IOException;
import org.apache.zookeeper.server.ZooKeeperServer.DataTreeBuilder;
/**
* The observable server broadcast notifications when its state changes.
*
......@@ -31,13 +33,16 @@ public class ObservableZooKeeperServer extends ZooKeeperServer{
private ZooKeeperObserverNotifier notifier=new ZooKeeperObserverNotifier(this);
public ObservableZooKeeperServer(File dataDir, File dataLogDir,
int tickTime,DataTreeBuilder treeBuilder) throws IOException {
super(dataDir, dataLogDir, tickTime,treeBuilder);
public ObservableZooKeeperServer() {
super();
}
public ObservableZooKeeperServer(File dataDir, File dataLogDir, int tickTime, DataTreeBuilder treeBuilder) throws IOException {
super(dataDir, dataLogDir, tickTime, treeBuilder);
}
public ObservableZooKeeperServer(DataTreeBuilder treeBuilder) throws IOException {
super(treeBuilder);
public ObservableZooKeeperServer(File dataDir, File dataLogDir, int tickTime) throws IOException {
super(dataDir, dataLogDir, tickTime);
}
public void shutdown() {
......
......@@ -44,6 +44,7 @@ import org.apache.zookeeper.server.ObservableNIOServerCnxn;
import org.apache.zookeeper.server.ServerCnxn;
import org.apache.zookeeper.server.ZooKeeperServer;
import org.apache.zookeeper.server.ZooTrace;
import org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer;
import org.apache.zookeeper.server.util.ConnectionObserver;
import org.apache.zookeeper.server.util.ObserverManager;
import org.apache.zookeeper.server.util.QuorumPeerObserver;
......@@ -201,45 +202,21 @@ public class ManagedQuorumPeer extends ObservableQuorumPeer {
ObserverManager.getInstance().add(new ManagedConnectionObserver());
}
public ManagedQuorumPeer(ArrayList<QuorumServer> quorumPeers, File dataDir,
File dataLogDir,int electionAlg, int electionPort,long myid, int tickTime,
int initLimit, int syncLimit,NIOServerCnxn.Factory cnxnFactory)
throws IOException {
super(quorumPeers, dataDir, dataLogDir,electionAlg, electionPort,myid,
tickTime, initLimit, syncLimit,cnxnFactory);
public ManagedQuorumPeer() {
super();
setupObservers();
}
public ManagedQuorumPeer(NIOServerCnxn.Factory cnxnFactory) throws IOException {
super(cnxnFactory);
public ManagedQuorumPeer(ArrayList<QuorumServer> quorumPeers, File dataDir, File dataLogDir, int clientPort, int electionAlg, int electionPort, long myid, int tickTime, int initLimit,
int syncLimit) throws IOException {
super(quorumPeers, dataDir, dataLogDir, clientPort, electionAlg, electionPort, myid, tickTime, initLimit, syncLimit);
setupObservers();
}
/**
* To start the replicated server specify the configuration file name on the
* command line.
* @param args command line
*/
public static void main(String[] args) {
if (args.length == 2) {
ManagedZooKeeperServer.main(args);
return;
}
QuorumPeerConfig.parse(args);
if (!QuorumPeerConfig.isStandalone()) {
ZooKeeperObserverManager.setAsConcrete();
runPeer(new QuorumPeer.Factory() {
public QuorumPeer create(NIOServerCnxn.Factory cnxnFactory)
throws IOException {
return new ManagedQuorumPeer(cnxnFactory);
}
public NIOServerCnxn.Factory createConnectionFactory() throws IOException {
return new ObservableNIOServerCnxn.Factory(getClientPort());
}
});
}else{
// there is only server in the quorum -- run as standalone
ManagedZooKeeperServer.main(args);
}
public ManagedQuorumPeer(ArrayList<QuorumServer> quorumPeers, File dataDir, File dataLogDir, int electionType, int electionPort, long myid, int tickTime, int initLimit, int syncLimit,
NIOServerCnxn.Factory cnxnFactory) throws IOException {
super(quorumPeers, dataDir, dataLogDir, electionType, electionPort, myid, tickTime, initLimit, syncLimit, cnxnFactory);
setupObservers();
}
}
/**
* 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.
*/
package org.apache.zookeeper.server.quorum;
import static org.apache.zookeeper.server.ServerConfig.getClientPort;
import static org.apache.zookeeper.server.quorum.QuorumPeerConfig.getElectionAlg;
import static org.apache.zookeeper.server.quorum.QuorumPeerConfig.getServerId;
import static org.apache.zookeeper.server.quorum.QuorumPeerConfig.getServers;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.log4j.Logger;
import org.apache.zookeeper.jmx.MBeanRegistry;
import org.apache.zookeeper.jmx.ZKMBeanInfo;
import org.apache.zookeeper.jmx.server.ConnectionBean;
import org.apache.zookeeper.jmx.server.DataTreeBean;
import org.apache.zookeeper.jmx.server.quorum.FollowerBean;
import org.apache.zookeeper.jmx.server.quorum.LeaderBean;
import org.apache.zookeeper.jmx.server.quorum.LeaderElectionBean;
import org.apache.zookeeper.jmx.server.quorum.LocalPeerBean;
import org.apache.zookeeper.jmx.server.quorum.QuorumBean;
import org.apache.zookeeper.jmx.server.quorum.RemotePeerBean;
import org.apache.zookeeper.jmx.server.quorum.ServerBean;
import org.apache.zookeeper.server.ManagedZooKeeperServerMain;
import org.apache.zookeeper.server.ManagedZooKeeperServer;
import org.apache.zookeeper.server.NIOServerCnxn;
import org.apache.zookeeper.server.ObservableNIOServerCnxn;
import org.apache.zookeeper.server.ServerCnxn;
import org.apache.zookeeper.server.ServerConfig;
import org.apache.zookeeper.server.ZooKeeperServer;
import org.apache.zookeeper.server.ZooTrace;
import org.apache.zookeeper.server.util.ConnectionObserver;
import org.apache.zookeeper.server.util.ObserverManager;
import org.apache.zookeeper.server.util.QuorumPeerObserver;
import org.apache.zookeeper.server.util.ServerObserver;
import org.apache.zookeeper.server.util.ZooKeeperObserverManager;
/**
* This class launches a replicated zookeeper server with JMX support
* enabled. The users can connect to the server JVM and manage
* the server state (such as currently open client connections) and view runtime
* statistics using one of existing GUI JMX consoles (jconsole, for example).
* Please refer to the JDK vendor documentation for further information on how
* to enable JMX support in the JVM.
* <p>
* The server provides following MBeans:
* <ul>
* <li>Quorum MBean -- provides quorum runtime statistics, see {@link QuorumMXBean}.
* <li>Peer MBean -- provides information about quorum peers (local and remote),
* see {@link LocalPeerMXBean} and {@link RemotePeerMXBean}.
* <li>Leader election MBean -- provides runtime info on leader election protocol,
* see {@link LeaderElectionMXBean}
* <li>Zookeeper server MBean -- provides various configuraton data and runtime
* statistics, see {@link ZooKeeperServerMXBean}
* <li>Data tree MBean -- provides runtime data tree statistics, see
* {@link DataTreeMXBean}
* <li>Client connection MBean -- provides runtime statistics as well as
* connection management operations, see {@link ConnectionMXBean}
* </ul>
* The client connection is a dynamic resource and therefore the connection
* MBeans are dynamically created and destroyed as the clients connect to and
* disconnect from the server.
*/
public class ManagedQuorumPeerMain {
private static final Logger LOG = Logger.getLogger(ManagedQuorumPeerMain.class);
/**
* To start the replicated server specify the configuration file name on the
* command line.
* @param args command line
*/
public static void main(String[] args) {
if (args.length == 2) {
ManagedZooKeeperServerMain.main(args);
return;
}
QuorumPeerConfig.parse(args);
if (!QuorumPeerConfig.isStandalone()) {
ZooKeeperObserverManager.setAsConcrete();
runPeer(new QuorumPeer.Factory() {
public QuorumPeer create(NIOServerCnxn.Factory cnxnFactory)
throws IOException {
ManagedQuorumPeer peer = new ManagedQuorumPeer();
peer.setClientPort(ServerConfig.getClientPort());
peer.setDataDir(new File(ServerConfig.getDataDir()));
peer.setDataLogDir(new File(ServerConfig.getDataLogDir()));
peer.setQuorumPeers(QuorumPeerConfig.getServers());
peer.setElectionPort(QuorumPeerConfig.getElectionPort());
peer.setElectionType(QuorumPeerConfig.getElectionAlg());
peer.setMyid(QuorumPeerConfig.getServerId());
peer.setTickTime(QuorumPeerConfig.getTickTime());
peer.setInitLimit(QuorumPeerConfig.getInitLimit());
peer.setSyncLimit(QuorumPeerConfig.getSyncLimit());
peer.setCnxnFactory(cnxnFactory);
return peer;
}
public NIOServerCnxn.Factory createConnectionFactory() throws IOException {
return new ObservableNIOServerCnxn.Factory(getClientPort());
}
});
}else{
// there is only server in the quorum -- run as standalone
ManagedZooKeeperServerMain.main(args);
}
}
public static void runPeer(QuorumPeer.Factory qpFactory) {
try {
QuorumStats.registerAsConcrete();
QuorumPeer self = qpFactory.create(qpFactory.createConnectionFactory());
self.start();
self.join();
} catch (Exception e) {
LOG.fatal("Unexpected exception",e);
}
System.exit(2);
}
}
......@@ -24,6 +24,8 @@ import java.util.ArrayList;
import org.apache.zookeeper.server.NIOServerCnxn;
import org.apache.zookeeper.server.ZooKeeperServer;
import org.apache.zookeeper.server.NIOServerCnxn.Factory;
import org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer;
import org.apache.zookeeper.server.util.EventInfo;
import org.apache.zookeeper.server.util.ObservableComponent;
import org.apache.zookeeper.server.util.ObserverManager;
......@@ -58,17 +60,20 @@ public class ObservableQuorumPeer extends QuorumPeer implements ObservableCompon
};
public abstract void dispatch(ObservableQuorumPeer peer,QuorumPeerObserver ob);
}
public ObservableQuorumPeer(ArrayList<QuorumServer> quorumPeers,
File dataDir, File dataLogDir, int electionAlg, int electionPort,long myid,
int tickTime, int initLimit, int syncLimit,NIOServerCnxn.Factory cnxnFactory)
throws IOException {
super(quorumPeers, dataDir, dataLogDir,electionAlg,electionPort, myid,
tickTime, initLimit, syncLimit,cnxnFactory);
public ObservableQuorumPeer() {
super();
}
public ObservableQuorumPeer(ArrayList<QuorumServer> quorumPeers, File dataDir, File dataLogDir, int clientPort, int electionAlg, int electionPort, long myid, int tickTime, int initLimit,
int syncLimit) throws IOException {
super(quorumPeers, dataDir, dataLogDir, clientPort, electionAlg, electionPort, myid, tickTime, initLimit, syncLimit);
}
public ObservableQuorumPeer(NIOServerCnxn.Factory cnxnFactory) throws IOException {
super(cnxnFactory);
public ObservableQuorumPeer(ArrayList<QuorumServer> quorumPeers, File dataDir, File dataLogDir, int electionType, int electionPort, long myid, int tickTime, int initLimit, int syncLimit,
NIOServerCnxn.Factory cnxnFactory) throws IOException {
super(quorumPeers, dataDir, dataLogDir, electionType, electionPort, myid, tickTime, initLimit, syncLimit, cnxnFactory);
}
// instantiate an observable follower
......
......@@ -18,11 +18,7 @@
package org.apache.zookeeper;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
......@@ -30,16 +26,13 @@ import java.util.Map;
import java.util.Set;
import org.apache.log4j.Logger;
import org.apache.zookeeper.AsyncCallback.ACLCallback;
import org.apache.zookeeper.AsyncCallback.ChildrenCallback;
import org.apache.zookeeper.AsyncCallback.DataCallback;
import org.apache.zookeeper.AsyncCallback.StatCallback;
import org.apache.zookeeper.AsyncCallback.StringCallback;
import org.apache.zookeeper.AsyncCallback.VoidCallback;
import org.apache.zookeeper.ZooDefs.Ids;
import org.apache.zookeeper.data.ACL;
import org.apache.zookeeper.data.Id;
import org.apache.zookeeper.data.Stat;
import org.apache.zookeeper.proto.CreateRequest;
import org.apache.zookeeper.proto.CreateResponse;
......@@ -195,7 +188,7 @@ public class ZooKeeper {
}
}
}
/**
* Register a watcher for a particular path.
*/
......@@ -207,10 +200,10 @@ public class ZooKeeper {
Watcher watcher, String path)
{
this.watches = watches;
this.watcher = watcher;
this.watcher = watcher;
this.path = path;
}
/**
* Register the watcher with the set of watches on path.
* @param rc the result code of the operation that attempted to
......@@ -936,200 +929,6 @@ public class ZooKeeper {
// Everything below this line is for testing!
static void usage() {
System.err.println("ZooKeeper host:port cmd args");
System.err.println("\tcreate path data acl");
System.err.println("\tdelete path [version]");
System.err.println("\tset path data [version]");