Update of /cvsroot/cweb/bigdata/src/resources/config/standalone In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30146/src/resources/config/standalone Added Files: ServerStarter.config README.txt DataServer1.properties DataServer0.properties DataServer1.config DataServer0.config Log Message: Added "standalone" bigdata instance configuration example. This just starts two data servers on the same host right now, but I plan to expand it to a full local bigdata instance. --- NEW FILE: ServerStarter.config --- import java.io.File; import com.sun.jini.start.ServiceDescriptor; import com.sun.jini.start.NonActivatableServiceDescriptor; /* * Sample configuration for starting a service using the Jini * ServiceStarter. * * Note: DO NOT include anything outside of com.sun.jini.start and the * core Java packages or you will get a ClassNotFoundException when * the ServiceStarter tries to resolve the imports! If you see this * anyway, then add "jini-ext.jar" to the classpath and it will * resolve the ConfigurationException class and then show you the * stack trace so that you can figure out what is going on (I find * that it can help tremendously to have "jini-ext.jar" in the * classpath when working on this configuration - and can even appear * to be necessary for the server to start! * * @see http://java.sun.com/products/jini/2.0/doc/api/com/sun/jini/start/ServiceStarter.html */ com.sun.jini.start { /* * Code base for downloadable code exposed by this service. */ private static codebase = "http://proto.cognitiveweb.org/maven-repository/bigdata/jars/"; /* * @todo restrict the policy to what is actually required by the * service. Among other things, we only need access to a * temporary directory and to the directory in which the journals * and index segments will be stored, not general read/write on * the disk. */ private static policy = "policy.all"; /* * The directory containing the various JARs. */ private static libdir = "lib"+File.separator; /* * Declare dependencies for the server here. */ private static classpath = // jini libdir+"jini-core.jar"+File.pathSeparator+ libdir+"jini-ext.jar"+File.pathSeparator+ libdir+"reggie.jar"+File.pathSeparator+ libdir+"sun-util.jar"+File.pathSeparator+ // utility JARs. libdir+"log4j-1.2.8.jar"+File.pathSeparator+ libdir+"ctc_utils-5-4-2005.jar"+File.pathSeparator+ libdir+"lgpl-utils-1.0-b1-dev.jar"+File.pathSeparator+ libdir+"cweb-extser-0.1-b2-dev.jar"+File.pathSeparator+ // ICU (unicode support). libdir+"icu4j-3_6.jar"+File.pathSeparator+ // test suites only! libdir+"junit-3.8.1.jar"+File.pathSeparator+ libdir+"cweb-junit-ext-1.1-b2-dev.jar"+File.pathSeparator+ // main bigdata JAR. //libdir+ "bigdata.jar" ; /* * Server(s) to run. All servers will run in the same VM. * * @todo start metadata server, transaction server, load-balancer, * and job scheduler. */ static serviceDescriptors = new ServiceDescriptor[] { /* * data server(s) */ new NonActivatableServiceDescriptor( codebase, policy, classpath, "com.bigdata.service.DataServer", new String[] { "src/resources/config/standalone/DataServer0.config" }) , new NonActivatableServiceDescriptor( codebase, policy, classpath, "com.bigdata.service.DataServer", new String[] { "src/resources/config/standalone/DataServer1.config" }) }; } --- NEW FILE: DataServer0.properties --- # DataServer configuration. file=DataServer0.jnl --- NEW FILE: DataServer1.config --- import java.io.File; import net.jini.jeri.BasicILFactory; import net.jini.jeri.BasicJeriExporter; import net.jini.jeri.tcp.TcpServerEndpoint; import net.jini.discovery.LookupDiscovery; import net.jini.core.discovery.LookupLocator; import net.jini.core.entry.Entry; import net.jini.lookup.entry.Name; import net.jini.lookup.entry.Comment; import net.jini.lookup.entry.Address; import net.jini.lookup.entry.Location; import net.jini.lookup.entry.ServiceInfo; /* * Declares how the service will provision itself. */ ServiceDescription { /* * This object is used to export the service proxy. The choice here effects * the protocol that will be used for communications between the clients and * the service. * * @todo Explore JERI nio option and customization support for serialization. */ exporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0), new BasicILFactory()); /* * The name of the property file containing the configuration information for * the service itself (where it will locate its files, etc). */ propertyFile = new File("src/resources/config/standalone/DataServer1.properties"); /* * The file on which the serviceID will be written. */ serviceIdFile = new File("DataServer1.id"); } /* * Declares how the service will advertise itself. */ AdvertDescription { /* * Entry attributes used to describe the service. */ entries = new Entry[] { new Name("DataService1"), // human facing name. new ServiceInfo("bigdata", // product or package name "SYSTAP,LLC", // manufacturer "SYSTAP,LLC", // vendor "0.1-beta", // version "DataService", // model "serial#" // serialNumber ) }; /* * Note: multicast discovery is always used if LookupDiscovery.ALL_GROUPS is * specified. */ // groups = LookupDiscovery.ALL_GROUPS; groups = new String[]{"bigdata"}; /* * One or more unicast URIs of the form jini://host/ or jini://host:port/. * This MAY be an empty array if you want to use multicast discovery _and_ * you have specified LookupDiscovery.ALL_GROUPS above. */ unicastLocators = new LookupLocator[] { // empty new LookupLocator("jini://localhost/") }; } --- NEW FILE: DataServer1.properties --- # DataServer configuration. file=DataServer1.jnl --- NEW FILE: README.txt --- A sample configuration for a standalone bigdata instance (single host, one or more data servers). --- NEW FILE: DataServer0.config --- import java.io.File; import net.jini.jeri.BasicILFactory; import net.jini.jeri.BasicJeriExporter; import net.jini.jeri.tcp.TcpServerEndpoint; import net.jini.discovery.LookupDiscovery; import net.jini.core.discovery.LookupLocator; import net.jini.core.entry.Entry; import net.jini.lookup.entry.Name; import net.jini.lookup.entry.Comment; import net.jini.lookup.entry.Address; import net.jini.lookup.entry.Location; import net.jini.lookup.entry.ServiceInfo; /* * Declares how the service will provision itself. */ ServiceDescription { /* * This object is used to export the service proxy. The choice here effects * the protocol that will be used for communications between the clients and * the service. * * @todo Explore JERI nio option and customization support for serialization. */ exporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0), new BasicILFactory()); /* * The name of the property file containing the configuration information for * the service itself (where it will locate its files, etc). */ propertyFile = new File("src/resources/config/standalone/DataServer0.properties"); /* * The file on which the serviceID will be written. */ serviceIdFile = new File("DataServer0.id"); } /* * Declares how the service will advertise itself. */ AdvertDescription { /* * Entry attributes used to describe the service. */ entries = new Entry[] { new Name("DataService0"), // human facing name. new ServiceInfo("bigdata", // product or package name "SYSTAP,LLC", // manufacturer "SYSTAP,LLC", // vendor "0.1-beta", // version "DataService", // model "serial#" // serialNumber ) }; /* * Note: multicast discovery is always used if LookupDiscovery.ALL_GROUPS is * specified. */ // groups = LookupDiscovery.ALL_GROUPS; groups = new String[]{"bigdata"}; /* * One or more unicast URIs of the form jini://host/ or jini://host:port/. * This MAY be an empty array if you want to use multicast discovery _and_ * you have specified LookupDiscovery.ALL_GROUPS above. */ unicastLocators = new LookupLocator[] { // empty new LookupLocator("jini://localhost/") }; } |