geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [02/18] incubator-geode git commit: GEODE-80: Imported databrowser from geode-1.0.0-SNAPSHOT-2.src.tar
Date Mon, 06 Jul 2015 21:47:27 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/battery/com/gemstone/databrowser/objects/SubEmployee.java
----------------------------------------------------------------------
diff --git a/databrowser/tests/battery/com/gemstone/databrowser/objects/SubEmployee.java b/databrowser/tests/battery/com/gemstone/databrowser/objects/SubEmployee.java
new file mode 100644
index 0000000..47f9b00
--- /dev/null
+++ b/databrowser/tests/battery/com/gemstone/databrowser/objects/SubEmployee.java
@@ -0,0 +1,53 @@
+package com.gemstone.databrowser.objects;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+
+/**
+ * SubEmployee ObjectType.
+ * 
+ * @author vreddy
+ * 
+ */
+public class SubEmployee extends Employee implements DataSerializable {
+
+  public byte empId;
+
+  public SubEmployee() {
+    super();
+  }
+
+  public SubEmployee(String ename, boolean eisMale, long esalary, byte eId,
+      char eBlock, Work eWork) {
+    super(ename, eisMale, esalary, eId, eBlock, eWork);
+    super.empId = (byte)15;
+    this.empId = eId;
+  }
+
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    this.name = DataSerializer.readString(in);
+    this.male = DataSerializer.readBoolean(in);
+    this.salary = DataSerializer.readLong(in);
+    this.empId = DataSerializer.readByte(in);
+    this.empWork = (Work)DataSerializer.readObject(in);
+  }
+
+  public void toData(DataOutput out) throws IOException {
+    DataSerializer.writeString(this.name, out);
+    DataSerializer.writeBoolean(this.male, out);
+    DataSerializer.writeLong(this.salary, out);
+    DataSerializer.writeByte(this.empId, out);
+    DataSerializer.writeObject(empWork, out);
+  }
+
+  public String toString() {
+    StringBuffer buffer = new StringBuffer();
+    buffer.append(" SubEmployee [ empId = " + this.empId + "]");
+    return buffer.toString();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/battery/com/gemstone/databrowser/objects/TestConfig.properties
----------------------------------------------------------------------
diff --git a/databrowser/tests/battery/com/gemstone/databrowser/objects/TestConfig.properties b/databrowser/tests/battery/com/gemstone/databrowser/objects/TestConfig.properties
new file mode 100644
index 0000000..3d9110f
--- /dev/null
+++ b/databrowser/tests/battery/com/gemstone/databrowser/objects/TestConfig.properties
@@ -0,0 +1,25 @@
+#Configuration File. 
+
+Portfolio.ID=50
+Portfolio.pkid=main
+Portfolio.type =XYZ
+Portfolio.status =active
+Portfolio.description =Info
+Portfolio.names=aaa:bbb:ccc:ddd
+Portfolio.secIds=SUN:IBM:YHOO:GOOG:MSFT:AOL:APPL:ORCL:SAP:DELL:RHAT:NOVL:HP
+positions.secId=A1:A2:A3:A4:A5 
+positions.country=India:US:UK:SA:SL
+positions.issuers=Gemstone:IBM:Google:Oracle:TCS
+positions.bondRating=High:medium:null:low:medium
+positions.mktValues=99.1:28.2:3.4:50.0:30.0
+positions.delta=6.4
+positions.industry=1000
+positions.secType =Multiple
+positions.qty=83.4f
+positions.secLinks =Info
+positions.pid=28848
+positions.sharesOutstanding=78.6
+CustomerInvoiceHelper.names=Ricky:John:Martin
+CustomerInvoiceHelper.namesprob=0.2:0.5:0.3
+CustomerInvoiceHelper.address=Pune:Bombay:Banglore:Delhi 
+CustomerInvoiceHelper.addressprob=0.3:0.2:0.1:0.4

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/battery/com/gemstone/databrowser/objects/Work.java
----------------------------------------------------------------------
diff --git a/databrowser/tests/battery/com/gemstone/databrowser/objects/Work.java b/databrowser/tests/battery/com/gemstone/databrowser/objects/Work.java
new file mode 100644
index 0000000..11cab2c
--- /dev/null
+++ b/databrowser/tests/battery/com/gemstone/databrowser/objects/Work.java
@@ -0,0 +1,61 @@
+package com.gemstone.databrowser.objects;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+
+public class Work implements DataSerializable {
+  private String Designation;
+
+  private byte empCode;
+
+  private String Department;
+
+  public Work() {
+    this.Designation = null;
+    this.empCode = 0;
+    this.Department = null;
+
+  }
+
+  public Work(String Designation, byte empCode, String Department) {
+    super();
+    this.Designation = Designation;
+    this.empCode = empCode;
+    this.Department = Department;
+  }
+
+  public String getDesignation() {
+    return Designation;
+  }
+
+  public byte getempCode() {
+    return empCode;
+  }
+
+  public String getDepartment() {
+    return Department;
+  }
+
+  public void fromData(DataInput arg0) throws IOException,
+      ClassNotFoundException {
+    this.Designation = DataSerializer.readString(arg0);
+    this.empCode = DataSerializer.readByte(arg0);
+    this.Department = DataSerializer.readString(arg0);
+  }
+
+  public void toData(DataOutput arg0) throws IOException {
+    DataSerializer.writeString(this.Designation, arg0);
+    DataSerializer.writeByte(this.empCode, arg0);
+    DataSerializer.writeString(this.Department, arg0);
+  }
+
+  public String toString() {
+    StringBuffer buffer = new StringBuffer();
+    buffer.append("Work [ Designation :" + this.Designation + " , empCode :"
+        + this.empCode + " , Department : " + this.Department + "]");
+    return buffer.toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/battery/com/gemstone/databrowser/objects/positions.java
----------------------------------------------------------------------
diff --git a/databrowser/tests/battery/com/gemstone/databrowser/objects/positions.java b/databrowser/tests/battery/com/gemstone/databrowser/objects/positions.java
new file mode 100644
index 0000000..369110e
--- /dev/null
+++ b/databrowser/tests/battery/com/gemstone/databrowser/objects/positions.java
@@ -0,0 +1,405 @@
+package com.gemstone.databrowser.objects;
+
+import hydra.Log;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import objects.ConfigurableObject;
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.databrowser.Testutil;
+
+/**
+ * positions ObjectType.
+ *
+ * @author vreddy
+ *
+ */
+public class positions implements ConfigurableObject, Serializable,
+    DataSerializable {
+
+  private static List secIds;
+
+  private static List countries;
+
+  private static List issuers;
+
+  private static List bondRatings;
+
+  private static List mktValues;
+
+  public String secId;
+
+  private String country;
+
+  private String issuer;
+
+  private String bondRating;
+
+  private double mktValue;
+
+  private double delta;
+
+  private short industry;
+
+  private double sharesOutstanding;
+
+  private float qty;
+
+  private String secLinks;
+
+  public String secType;
+
+  private int pid;
+
+  public static int cnt = 0;
+
+  static {
+    String sId = Testutil.getProperty("positions.secId");
+    if (sId != null) {
+      String[] allsecIds = sId.split(":");
+      secIds = new ArrayList();
+      for (int k = 0; k < allsecIds.length; k++) {
+        secIds.add(allsecIds[k]);
+      }
+    }
+    else {
+      Log.getLogWriter().warning("positions.secId property is not available.");
+    }
+
+    String cntry = Testutil.getProperty("positions.country");
+    if (cntry != null) {
+      String[] allcountries = cntry.split(":");
+      countries = new ArrayList();
+      for (int l = 0; l < allcountries.length; l++) {
+        countries.add(allcountries[l]);
+      }
+    }
+    else {
+      Log.getLogWriter()
+          .warning("positions.country property is not available.");
+    }
+
+    String issur = Testutil.getProperty("positions.issuers");
+    if (issur != null) {
+      String[] allissuers = issur.split(":");
+      issuers = new ArrayList();
+      for (int m = 0; m < allissuers.length; m++) {
+        issuers.add(allissuers[m]);
+      }
+    }
+    else {
+      Log.getLogWriter()
+          .warning("positions.issuers property is not available.");
+    }
+
+    String bratings = Testutil.getProperty("positions.bondRating");
+    if (bratings != null) {
+      String[] allbondRatings = bratings.split(":");
+      bondRatings = new ArrayList();
+      for (int p = 0; p < allbondRatings.length; p++) {
+        bondRatings.add(allbondRatings[p]);
+      }
+    }
+    else {
+      Log.getLogWriter().warning(
+          "positions.bondRating property is not available.");
+    }
+
+    String mkvls = Testutil.getProperty("positions.mktValues");
+    if (mkvls != null) {
+      String[] allmktValues = mkvls.split(":");
+      mktValues = new ArrayList();
+      for (int q = 0; q < allmktValues.length; q++) {
+        mktValues.add(Double.valueOf(allmktValues[q]));
+      }
+    }
+    else {
+      Log.getLogWriter().warning(
+          "positions.mktValues property is not available.");
+    }
+  }
+
+  /* public no-arg constructor required for DataSerializable */
+  public positions() {
+  }
+
+  public positions(String id, double out) {
+    secId = id;
+    sharesOutstanding = out;
+    pid = cnt++;
+    this.mktValue = (double)cnt;
+  }
+
+  public boolean equals(Object o) {
+    if (!(o instanceof positions))
+      return false;
+    return this.secId.equals(((positions)o).secId);
+  }
+
+  public int hashCode() {
+    return this.secId.hashCode();
+  }
+
+  public static void resetCounter() {
+    cnt = 0;
+  }
+
+  public double getMktValue() {
+    return this.mktValue;
+  }
+
+  public String getSecId() {
+    return secId;
+  }
+
+  public void setSecId(String secId) {
+    this.secId = secId;
+  }
+
+  public String getIssuer() {
+    return issuer;
+  }
+
+  public void setIssuer(String issuer) {
+    this.issuer = issuer;
+  }
+
+  public String getCountry() {
+    return country;
+  }
+
+  public void setCountry(String country) {
+    this.country = country;
+  }
+
+  public String getSecLinks() {
+    return secLinks;
+  }
+
+  public void setSecLinks(String secLinks) {
+    this.secLinks = secLinks;
+  }
+
+  public String getBondRating() {
+    return bondRating;
+  }
+
+  public void setBondRating(String bondRating) {
+    this.bondRating = bondRating;
+  }
+
+  public double getDelta() {
+    return delta;
+  }
+
+  public void setDelta(double delta) {
+    this.delta = delta;
+  }
+
+  public short getIndustry() {
+    return industry;
+  }
+
+  public void setIndustry(short industry) {
+    this.industry = industry;
+  }
+
+  public void setMktValue(double mktValue) {
+    this.mktValue = mktValue;
+  }
+
+  public float getQty() {
+    return qty;
+  }
+
+  public void setQty(float qty) {
+    this.qty = qty;
+  }
+
+  public String getSecType() {
+    return secType;
+  }
+
+  public void setSecType(String secType) {
+    this.secType = secType;
+  }
+
+  public int getPid() {
+    return pid;
+  }
+
+  public void setPid(int pid) {
+    this.pid = pid;
+  }
+
+  public double getSharesOutstanding() {
+    return sharesOutstanding;
+  }
+
+  public void setSharesOutstanding(double sharesOutstanding) {
+    this.sharesOutstanding = sharesOutstanding;
+  }
+
+  public String toString() {
+    return "positions [secId=" + this.secId + " country=" + this.country
+        + " issuer=" + this.issuer + " bondRating=" + this.bondRating
+        + " mktValue=" + this.mktValue + " delta=" + this.delta + " industry="
+        + this.industry + " sharesOutstanding=" + this.sharesOutstanding
+        + " qty=" + this.qty + " secLinks=" + this.secLinks + " secType="
+        + this.secType + " id=" + this.pid + "]";
+  }
+
+  public Set getSet(int size) {
+    Set set = new HashSet();
+    for (int i = 0; i < size; i++) {
+      set.add("" + i);
+    }
+    return set;
+  }
+
+  public Set getCol() {
+    Set set = new HashSet();
+    for (int i = 0; i < 2; i++) {
+      set.add("" + i);
+    }
+    return set;
+  }
+
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    this.bondRating = DataSerializer.readString(in);
+    this.country = DataSerializer.readString(in);
+    this.delta = in.readDouble();
+    this.industry = (short)in.readLong();
+    this.issuer = DataSerializer.readString(in);
+    this.mktValue = in.readDouble();
+    this.qty = (float)in.readDouble();
+    this.secId = DataSerializer.readString(in);
+    this.secLinks = DataSerializer.readString(in);
+    this.secType = DataSerializer.readString(in);
+    this.sharesOutstanding = in.readDouble();
+    this.pid = in.readInt();
+  }
+
+  public void toData(DataOutput out) throws IOException {
+    DataSerializer.writeString(this.bondRating, out);
+    DataSerializer.writeString(this.country, out);
+    out.writeDouble(this.delta);
+    out.writeLong(this.industry);
+    DataSerializer.writeString(this.issuer, out);
+    out.writeDouble(this.mktValue);
+    out.writeDouble(this.qty);
+    DataSerializer.writeString(this.secId, out);
+    DataSerializer.writeString(this.secLinks, out);
+    DataSerializer.writeString(this.secType, out);
+    out.writeDouble(this.sharesOutstanding);
+    out.writeInt(this.pid);
+  }
+
+  public int getIndex() {
+    return pid;
+  }
+
+  public void validate(int index) {
+    // Do Nothing.
+  }
+
+  public void init(int i) {
+
+    String sos, dls, idstry, qy, pid;
+    this.country = (String)countries.get((i) % countries.size());
+    this.secId = (String)secIds.get((i) % secIds.size());
+    this.issuer = (String)issuers.get((i) % issuers.size());
+    this.bondRating = (String)bondRatings.get((i) % bondRatings.size());
+    this.mktValue = ((Double)mktValues.get((i) % mktValues.size()))
+        .doubleValue();
+    this.secType = Testutil.getProperty("positions.secType");
+    if (this.secType == null) {
+      Log.getLogWriter()
+          .warning("positions.secType property is not available.");
+    }
+    this.secLinks = Testutil.getProperty("positions.secLinks");
+    if (this.secLinks == null) {
+      Log.getLogWriter().warning(
+          "positions.secLinks property is not available.");
+    }
+
+    sos = Testutil.getProperty("positions.sharesOutstanding");
+    if (sos != null) {
+      try {
+        double dsos = Double.parseDouble(sos);
+        this.sharesOutstanding = dsos;
+      }
+      catch (NumberFormatException e1) {
+        Log.getLogWriter().error(e1);
+      }
+    }
+    else {
+      Log.getLogWriter().warning(
+          "positions.sharesOutstanding property is not available.");
+    }
+
+    dls = Testutil.getProperty("positions.delta");
+    if (dls != null) {
+      try {
+        double dl = Double.parseDouble(dls);
+        this.delta = dl;
+      }
+      catch (NumberFormatException e2) {
+        Log.getLogWriter().error(e2);
+      }
+    }
+    else {
+      Log.getLogWriter().warning("positions.delta property is not available.");
+    }
+
+    idstry = Testutil.getProperty("positions.industry");
+    if (idstry != null) {
+      try {
+        short sh = Short.parseShort(idstry.trim());
+        this.industry = sh;
+      }
+      catch (NumberFormatException e3) {
+        Log.getLogWriter().error(e3);
+      }
+    }
+    else {
+      Log.getLogWriter().warning(
+          "positions.industry property is not available.");
+    }
+
+    qy = Testutil.getProperty("positions.qty");
+    if (qy != null) {
+      float f;
+      try {
+        f = Float.parseFloat(qy);
+        this.qty = f;
+      }
+      catch (NumberFormatException e4) {
+        Log.getLogWriter().error(e4);
+      }
+    }
+    else {
+      Log.getLogWriter().warning("positions.qty property is not available.");
+    }
+
+    pid = Testutil.getProperty("positions.pid");
+    if (pid != null) {
+      try {
+        int pd = Integer.parseInt(pid.trim());
+        this.pid = pd;
+      }
+      catch (NumberFormatException nfe) {
+        Log.getLogWriter().error(nfe);
+      }
+    }
+    else {
+      Log.getLogWriter().warning("positions.pid property is not available.");
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/battery/conf/populateRandomRegions.bt
----------------------------------------------------------------------
diff --git a/databrowser/tests/battery/conf/populateRandomRegions.bt b/databrowser/tests/battery/conf/populateRandomRegions.bt
new file mode 100644
index 0000000..596b3b3
--- /dev/null
+++ b/databrowser/tests/battery/conf/populateRandomRegions.bt
@@ -0,0 +1,4 @@
+conf/populateRandomRegions.conf
+A = bridge  bridgeHosts =  1 bridgeVMsPerHost = 1  bridgeThreadsPerVM = 1
+B = agent   agentHosts  =  1 agentVMsPerHost  = 1  agentThreadsPerVM  = 1
+hc.nPutThreads= 2

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/battery/conf/populateRandomRegions.conf
----------------------------------------------------------------------
diff --git a/databrowser/tests/battery/conf/populateRandomRegions.conf b/databrowser/tests/battery/conf/populateRandomRegions.conf
new file mode 100644
index 0000000..feae939
--- /dev/null
+++ b/databrowser/tests/battery/conf/populateRandomRegions.conf
@@ -0,0 +1,94 @@
+INCLUDE $JTESTS/hydraconfig/hydraparams1.inc;
+INCLUDE $JTESTS/hydraconfig/gemfireprms.inc;
+INCLUDE $JTESTS/hydraconfig/topology_2.inc;
+
+hydra.Prms-testDescription = "Test to start required no of servers ,populate regions data.";
+
+hydra.Prms-totalTaskTimeSec 			= 300;
+hydra.Prms-maxResultWaitSec 			= 350;
+
+//For starting the agent 
+hydra.AdminPrms-names				= admin;
+hydra.AdminPrms-distributedSystem		= ds;
+hydra.AgentPrms-names				= agent1;
+hydra.AgentPrms-adminName			= admin;
+
+hydra.BridgePrms-names       	         	= bridge;
+//hydra.BridgePrms-notifyBySubscription 		= true;
+
+hydra.CachePrms-names				= bridge agent;
+
+hydra.ConfigPrms-cacheConfig      		= bridge;
+hydra.ConfigPrms-bridgeConfig     		= bridge;
+hydra.ConfigPrms-agentConfig			= agent;
+
+hydra.GemFirePrms-names				= fcn "hydra.TestConfigFcns.generateNames(\"${A}gemfire\", ${${A}Hosts})" ncf
+			                          fcn "hydra.TestConfigFcns.generateNames(\"${B}gemfire\", ${${B}Hosts})" ncf;
+						  
+hydra.GemFirePrms-useLocator			= fcn "hydra.TestConfigFcns.duplicate(\"true\",    ${${A}Hosts})" ncf
+                                                  fcn "hydra.TestConfigFcns.duplicate(\"true\",    ${${B}Hosts})" ncf;
+                                               
+hydra.GemFirePrms-enableMcast		        = fcn "hydra.TestConfigFcns.duplicate(\"false\",    ${${A}Hosts})" ncf
+                                                  fcn "hydra.TestConfigFcns.duplicate(\"false\",    ${${B}Hosts})" ncf;   
+                                                  
+hydra.GemFirePrms-distributedSystem		= fcn "hydra.TestConfigFcns.duplicate(\"ds\",    ${${A}Hosts})" ncf
+		                                  fcn "hydra.TestConfigFcns.duplicate(\"ds\",    ${${B}Hosts})" ncf;					        
+
+hydra.log.LogPrms-file_logLevel			= fine;
+
+//hydra.HostPrms-hostNames			= fcn "hydra.TestConfigFcns.duplicate(\"halibut\",  ${${A}Hosts})" ncf
+//						  fcn "hydra.TestConfigFcns.duplicate(\"halibut\",  ${${B}Hosts})" ncf;
+
+hydra.RegionPrms-names                  	= serverRegion;
+hydra.RegionPrms-regionName     		= CustomerInvoice;
+hydra.RegionPrms-interestPolicy         	= All;
+hydra.RegionPrms-scope                  	= global;
+hydra.RegionPrms-dataPolicy     		= replicate;
+hydra.RegionPrms-partitionName  		= none;
+hydra.RegionPrms-multicastEnabled 		= true;
+hydra.RegionPrms-statisticsEnabled		= true;
+
+hydra.VmPrms-type                       	= fcn "hydra.TestConfigFcns.duplicate(\"server\",  ${bridgeHosts})" ncf;
+
+hydra.VmPrms-extraClassPaths        		= $GEMFIRE/lib/antlr.jar 
+						  $GEMFIRE/lib/gemfire.jar
+						  $GEMFIRE/lib/commons-logging.jar
+                                                  $GEMFIRE/lib/commons-modeler-2.0.jar
+						  $GEMFIRE/lib/mx4j.jar
+                                                  $GEMFIRE/lib/mx4j-remote.jar
+                                                  $GEMFIRE/lib/mx4j-tools.jar
+                                                  $GEMFIRE/lib/mail.jar
+                                                  $GEMFIRE/lib/security.jar;
+                                                                                                
+// Server Entities Setup
+admin.jmx.RecyclePrms-numberOfEntitiesInRegion 	= 10;
+admin.jmx.RecyclePrms-sleepBetweenCycles   	= 120; 						 					          					
+						    						  						  						    						  				
+THREADGROUP bridgeServer
+    totalThreads = ${bridgeHosts}
+    totalVMs = ${bridgeHosts}
+    clientNames  = fcn "hydra.TestConfigFcns.generateNames(\"bridge\", ${bridgeHosts}, true)" ncf;
+
+THREADGROUP agentForDS1
+    totalThreads = ${agentHosts}
+    totalVMs = ${agentHosts}
+    clientNames  = fcn "hydra.TestConfigFcns.generateNames(\"agent\", ${agentHosts}, true)" ncf;
+   
+INITTASK  taskClass = admin.jmx.JMXHelper
+	  taskMethod = startJMXAgent
+	  hydra.ConfigPrms-agentConfig = agent1
+	  threadgroups = agentForDS1
+          runMode = always
+      	  ;
+
+INITTASK  taskClass = com.gemstone.databrowser.CustomDataGenerator
+          taskMethod = startServerCache
+          threadGroups = bridgeServer	  
+          ;
+                                      
+TASK	  taskClass = com.gemstone.databrowser.MultipleRegionsDataGenerator
+          taskMethod = populateCustomerInvoice
+          threadGroups = bridgeServer
+          ;          
+
+          

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/battery/conf/prRegionPopulateTest.bt
----------------------------------------------------------------------
diff --git a/databrowser/tests/battery/conf/prRegionPopulateTest.bt b/databrowser/tests/battery/conf/prRegionPopulateTest.bt
new file mode 100644
index 0000000..6aaddc1
--- /dev/null
+++ b/databrowser/tests/battery/conf/prRegionPopulateTest.bt
@@ -0,0 +1,4 @@
+conf/prRegionPopulateTest.conf
+A = bridge  bridgeHosts =  1 bridgeVMsPerHost = 1  bridgeThreadsPerVM = 1
+B = agent   agentHosts  =  1 agentVMsPerHost  = 1  agentThreadsPerVM  = 1
+hc.nPutThreads=2

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/battery/conf/prRegionPopulateTest.conf
----------------------------------------------------------------------
diff --git a/databrowser/tests/battery/conf/prRegionPopulateTest.conf b/databrowser/tests/battery/conf/prRegionPopulateTest.conf
new file mode 100644
index 0000000..d3663ee
--- /dev/null
+++ b/databrowser/tests/battery/conf/prRegionPopulateTest.conf
@@ -0,0 +1,136 @@
+INCLUDE $JTESTS/hydraconfig/hydraparams1.inc;
+INCLUDE $JTESTS/hydraconfig/gemfireprms.inc;
+INCLUDE $JTESTS/hydraconfig/topology_2.inc;
+
+hydra.Prms-testDescription = "Test to start required no of servers ,populate different kind of regions and subRegions data.";
+
+hydra.Prms-totalTaskTimeSec 			= 600;
+hydra.Prms-maxResultWaitSec 			= 650;
+
+//For starting the agent 
+hydra.AdminPrms-names				= admin;
+hydra.AdminPrms-distributedSystem		= ds;
+hydra.AgentPrms-names				= agent1;
+hydra.AgentPrms-adminName			= admin;
+
+hydra.BridgePrms-names       	         	= bridge;
+//hydra.BridgePrms-notifyBySubscription 		= true;
+
+hydra.CachePrms-names				= bridge agent1;
+hydra.ConfigPrms-cacheConfig      		= bridge;
+hydra.ConfigPrms-bridgeConfig     		= bridge;
+hydra.ConfigPrms-agentConfig			= agent1;
+
+
+hydra.GemFirePrms-useLocator                    = true;
+
+hydra.GemFirePrms-names				= fcn "hydra.TestConfigFcns.generateNames(\"${A}gemfire\", ${${A}Hosts})" ncf
+			                          fcn "hydra.TestConfigFcns.generateNames(\"${B}gemfire\", ${${B}Hosts})" ncf;
+						  
+
+hydra.GemFirePrms-useLocator			= fcn "hydra.TestConfigFcns.duplicate(\"true\",    ${${A}Hosts})" ncf
+                                                  fcn "hydra.TestConfigFcns.duplicate(\"true\",    ${${B}Hosts})" ncf;
+                                                  
+
+hydra.GemFirePrms-enableMcast		        = fcn "hydra.TestConfigFcns.duplicate(\"false\",    ${${A}Hosts})" ncf
+                                                  fcn "hydra.TestConfigFcns.duplicate(\"false\",    ${${B}Hosts})" ncf;   
+                                                  
+
+hydra.GemFirePrms-distributedSystem		= fcn "hydra.TestConfigFcns.duplicate(\"ds\",    ${${A}Hosts})" ncf
+		                                  fcn "hydra.TestConfigFcns.duplicate(\"ds\",    ${${B}Hosts})" ncf;
+					          
+
+
+hydra.log.LogPrms-file_logLevel			= fine;
+
+//hydra.HostPrms-hostNames			= fcn "hydra.TestConfigFcns.duplicate(\"halibut\",  ${${A}Hosts})" ncf
+//						  fcn "hydra.TestConfigFcns.duplicate(\"halibut\",  ${${B}Hosts})" ncf;
+
+
+
+hydra.RegionPrms-names                  	= serverRegion	serverRegion1	serverRegion2	serverRegion3	serverRegion4;	
+hydra.RegionPrms-regionName     		= Employee	CustomerInvoice Shipment	Customer	Order;
+hydra.RegionPrms-interestPolicy         	= All		All		cachecontent	All		All;
+hydra.RegionPrms-scope                  	= default	default		local		default		dack;
+hydra.RegionPrms-dataPolicy     		= partition	partition	empty		normal		replicate;
+hydra.RegionPrms-partitionName  		= pr1		pr2		none		none		none;
+hydra.RegionPrms-multicastEnabled 		= true		true		true		true		true;
+hydra.RegionPrms-statisticsEnabled		= true;
+
+hydra.PartitionPrms-names       		= pr1 		pr2;
+
+hydra.VmPrms-type                       	= fcn "hydra.TestConfigFcns.duplicate(\"server\",  ${bridgeHosts})" ncf;
+
+
+hydra.VmPrms-extraClassPaths        		= $GEMFIRE/lib/antlr.jar 
+						  $GEMFIRE/lib/gemfire.jar
+						  $GEMFIRE/lib/commons-logging.jar
+                                                  $GEMFIRE/lib/commons-modeler-2.0.jar
+						  $GEMFIRE/lib/mx4j.jar
+                                                  $GEMFIRE/lib/mx4j-remote.jar
+                                                  $GEMFIRE/lib/mx4j-tools.jar
+                                                  $GEMFIRE/lib/mail.jar
+                                                  $GEMFIRE/lib/security.jar;
+                                                                                                
+// Server Entities Setup
+admin.jmx.RecyclePrms-numberOfEntitiesInRegion	= 200;
+admin.jmx.RecyclePrms-interestResultPolicy 	= none;
+admin.jmx.RecyclePrms-regionDepth          	= 3;   // for partition region no subregions allowed
+
+
+
+  						 					          					
+						    						  						  						    						  				
+THREADGROUP bridgeServer
+    totalThreads = ${bridgeHosts}
+    totalVMs = ${bridgeHosts}
+    clientNames  = fcn "hydra.TestConfigFcns.generateNames(\"bridge\", ${bridgeHosts}, true)" ncf;
+
+THREADGROUP agentForDS1
+    totalThreads = ${agentHosts}
+    totalVMs = ${agentHosts}
+    clientNames  = fcn "hydra.TestConfigFcns.generateNames(\"agent\", ${agentHosts}, true)" ncf;
+   
+
+INITTASK  taskClass = admin.jmx.JMXHelper
+	  taskMethod = startJMXAgent
+	  threadgroups = agentForDS1
+          runMode = always
+      	  ;
+
+INITTASK  taskClass = com.gemstone.databrowser.CustomDataGenerator
+          taskMethod = startServerCache
+          threadGroups = bridgeServer	  
+          ;
+	  
+INITTASK  taskClass = com.gemstone.databrowser.MultipleRegionsDataGenerator
+          taskMethod = populateEmployeeRegion 
+          hydra.ConfigPrms-regionConfig	= serverRegion	
+          threadGroups = bridgeServer          
+          ; 
+                                        
+INITTASK  taskClass = com.gemstone.databrowser.MultipleRegionsDataGenerator
+          taskMethod = populateShipmentRegion          	  
+          hydra.ConfigPrms-regionConfig	= serverRegion2
+          threadGroups = bridgeServer
+          ; 
+
+INITTASK  taskClass = com.gemstone.databrowser.MultipleRegionsDataGenerator
+          taskMethod = populateCustomerRegion
+          hydra.ConfigPrms-regionConfig	= serverRegion3	
+          threadGroups = bridgeServer
+          ;           
+         
+INITTASK  taskClass = com.gemstone.databrowser.MultipleRegionsDataGenerator
+          taskMethod = populateOrderRegion          
+          hydra.ConfigPrms-regionConfig	= serverRegion4
+          threadGroups = bridgeServer          
+          ; 
+
+TASK      taskClass = com.gemstone.databrowser.MultipleRegionsDataGenerator
+          taskMethod = populateCustomerInvoice
+          hydra.ConfigPrms-regionConfig	= serverRegion1	
+          threadGroups = bridgeServer
+          ; 
+         
+          

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/battery/conf/serverRegionsPopulate.bt
----------------------------------------------------------------------
diff --git a/databrowser/tests/battery/conf/serverRegionsPopulate.bt b/databrowser/tests/battery/conf/serverRegionsPopulate.bt
new file mode 100644
index 0000000..8756285
--- /dev/null
+++ b/databrowser/tests/battery/conf/serverRegionsPopulate.bt
@@ -0,0 +1,4 @@
+conf/serverRegionsPopulate.conf
+A = bridge  bridgeHosts =  3 bridgeVMsPerHost = 1  bridgeThreadsPerVM = 1
+B = agent   agentHosts  =  1 agentVMsPerHost  = 1  agentThreadsPerVM  = 1
+hc.nPutThreads=2

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/battery/conf/serverRegionsPopulate.conf
----------------------------------------------------------------------
diff --git a/databrowser/tests/battery/conf/serverRegionsPopulate.conf b/databrowser/tests/battery/conf/serverRegionsPopulate.conf
new file mode 100644
index 0000000..a430f64
--- /dev/null
+++ b/databrowser/tests/battery/conf/serverRegionsPopulate.conf
@@ -0,0 +1,118 @@
+INCLUDE $JTESTS/hydraconfig/hydraparams1.inc;
+INCLUDE $JTESTS/hydraconfig/gemfireprms.inc;
+INCLUDE $JTESTS/hydraconfig/topology_2.inc;
+
+hydra.Prms-testDescription = "Test to start required no of servers ,populate the regions data";
+
+hydra.Prms-totalTaskTimeSec 			= 300;
+hydra.Prms-maxResultWaitSec 			= 350;
+
+//For starting the agent 
+hydra.AdminPrms-names				= admin;
+hydra.AdminPrms-distributedSystem		= ds;
+hydra.AgentPrms-names				= agent1;
+hydra.AgentPrms-adminName			= admin;
+
+hydra.BridgePrms-names       	         	= bridge;
+//hydra.BridgePrms-notifyBySubscription 		= true;
+
+hydra.CachePrms-names				= bridge agent;
+hydra.ConfigPrms-cacheConfig      		= bridge;
+hydra.ConfigPrms-bridgeConfig     		= bridge;
+hydra.ConfigPrms-agentConfig			= agent;
+
+hydra.GemFirePrms-useLocator                    = true;
+
+hydra.GemFirePrms-names				= fcn "hydra.TestConfigFcns.generateNames(\"${A}gemfire\", ${${A}Hosts})" ncf
+			                          fcn "hydra.TestConfigFcns.generateNames(\"${B}gemfire\", ${${B}Hosts})" ncf;
+						  
+
+hydra.GemFirePrms-useLocator			= fcn "hydra.TestConfigFcns.duplicate(\"true\",    ${${A}Hosts})" ncf
+                                                  fcn "hydra.TestConfigFcns.duplicate(\"true\",    ${${B}Hosts})" ncf;
+                                                  
+
+hydra.GemFirePrms-enableMcast		        = fcn "hydra.TestConfigFcns.duplicate(\"false\",    ${${A}Hosts})" ncf
+                                                  fcn "hydra.TestConfigFcns.duplicate(\"false\",    ${${B}Hosts})" ncf;   
+                                                  
+
+hydra.GemFirePrms-distributedSystem		= fcn "hydra.TestConfigFcns.duplicate(\"ds\",    ${${A}Hosts})" ncf
+		                                  fcn "hydra.TestConfigFcns.duplicate(\"ds\",    ${${B}Hosts})" ncf;
+					          
+
+
+hydra.log.LogPrms-file_logLevel			= fine;
+
+//hydra.HostPrms-hostNames			= fcn "hydra.TestConfigFcns.duplicate(\"halibut\",  ${${A}Hosts})" ncf
+//						  fcn "hydra.TestConfigFcns.duplicate(\"halibut\",  ${${B}Hosts})" ncf;
+
+hydra.RegionPrms-names                  	= serverRegion	serverRegion1	serverRegion2	serverRegion3;	
+hydra.RegionPrms-regionName     		= Employee	Shipment	Customer	Order;
+hydra.RegionPrms-interestPolicy         	= All		All		All		All;
+hydra.RegionPrms-scope                  	= global	global		global		global;
+hydra.RegionPrms-dataPolicy     		= replicate	replicate	replicate	replicate;
+hydra.RegionPrms-partitionName  		= none		none		none		none;
+hydra.RegionPrms-multicastEnabled 		= true		true		true		true;
+hydra.RegionPrms-statisticsEnabled		= true;
+
+
+// For security enabling. 
+
+//hydra.GemFirePrms-securityName		= dummyScheme;
+//hydra.SecurityPrms-names			= dummyScheme;
+//hydra.SecurityPrms-clientAuthenticator	= security.DataBrowserAuthenticator.create;
+//hydra.SecurityPrms-clientAccessor		= security.QueryAuthorization.create;
+//hydra.SecurityPrms-clientExtraProperties	= security.DummyUserPasswordPrms;
+//security.DummyUserPasswordPrms-username	= databrowser;
+//security.DummyUserPasswordPrms-password	= databrowser;
+
+//hydra.GemFirePrms-locatorSecurityName		= dummyScheme;		  
+//hydra.SecurityPrms-peerAuthInit		= admin.security.DataBrowserAuthInit.create;
+
+
+hydra.VmPrms-type                       	= fcn "hydra.TestConfigFcns.duplicate(\"server\",  ${bridgeHosts})" ncf;
+
+hydra.VmPrms-extraClassPaths        		= $GEMFIRE/lib/antlr.jar 
+						  $GEMFIRE/lib/gemfire.jar
+						  $GEMFIRE/lib/commons-logging.jar
+                                                  $GEMFIRE/lib/commons-modeler-2.0.jar
+						  $GEMFIRE/lib/mx4j.jar
+                                                  $GEMFIRE/lib/mx4j-remote.jar
+                                                  $GEMFIRE/lib/mx4j-tools.jar
+                                                  $GEMFIRE/lib/mail.jar
+                                                  $GEMFIRE/lib/security.jar;
+                                                                                                
+// Server Entities Setup
+//admin.jmx.RecyclePrms-numberOfEntitiesInRegion= 20;
+admin.jmx.RecyclePrms-sleepBetweenCycles   	= 120;
+
+  						 					          					
+						    						  						  						    						  				
+THREADGROUP bridgeServer
+    totalThreads = ${bridgeHosts}
+    totalVMs = ${bridgeHosts}
+    clientNames  = fcn "hydra.TestConfigFcns.generateNames(\"bridge\", ${bridgeHosts}, true)" ncf;
+
+THREADGROUP agentForDS1
+    totalThreads = ${agentHosts}
+    totalVMs = ${agentHosts}
+    clientNames  = fcn "hydra.TestConfigFcns.generateNames(\"agent\", ${agentHosts}, true)" ncf;
+   
+
+INITTASK  taskClass = admin.jmx.JMXHelper
+	  taskMethod = startJMXAgent
+	  hydra.ConfigPrms-agentConfig = agent1
+	  threadgroups = agentForDS1
+          runMode = always
+      	  ;
+
+INITTASK  taskClass = com.gemstone.databrowser.CustomDataGenerator
+          taskMethod = startServerCache
+          threadGroups = bridgeServer	  
+          ;
+                                      
+TASK  	  taskClass = com.gemstone.databrowser.MultipleRegionsDataGenerator
+          taskMethod = populateRegions
+          threadGroups = bridgeServer
+          ;          
+
+          

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/battery/conf/serverTest.conf
----------------------------------------------------------------------
diff --git a/databrowser/tests/battery/conf/serverTest.conf b/databrowser/tests/battery/conf/serverTest.conf
new file mode 100644
index 0000000..a147c24
--- /dev/null
+++ b/databrowser/tests/battery/conf/serverTest.conf
@@ -0,0 +1,244 @@
+INCLUDE $JTESTS/hydraconfig/hydraparams1.inc;
+INCLUDE $JTESTS/hydraconfig/gemfireprms.inc;
+INCLUDE $JTESTS/hydraconfig/topology_3.inc;
+
+hydra.Prms-testDescription = "Test to start required no of servers and clients,populate the regions data  & for performing and executing queries.";
+
+hydra.Prms-totalTaskTimeSec 			= 600;
+hydra.Prms-maxResultWaitSec 			= 650;
+
+//For starting the agent 
+hydra.AdminPrms-names				= admin;
+hydra.AdminPrms-distributedSystem		= ds;
+hydra.AgentPrms-names				= agent1;
+hydra.AgentPrms-adminName			= admin;
+
+hydra.BridgePrms-names       	         	= bridge;
+//hydra.BridgePrms-notifyBySubscription 		= true;
+
+hydra.CachePrms-names				= bridge edge agent;
+
+hydra.ConfigPrms-cacheConfig      		= bridge;
+//hydra.ConfigPrms-regionConfig     		= Portfolio;
+hydra.ConfigPrms-bridgeConfig     		= bridge;
+hydra.ConfigPrms-agentConfig			= agent;
+
+hydra.GemFirePrms-names				= fcn "hydra.TestConfigFcns.generateNames(\"${A}gemfire\", ${${A}Hosts})" ncf
+			                          fcn "hydra.TestConfigFcns.generateNames(\"${B}gemfire\", ${${B}Hosts})" ncf
+						  fcn "hydra.TestConfigFcns.generateNames(\"${C}gemfire\", ${${C}Hosts})" ncf;
+
+hydra.GemFirePrms-useLocator			= fcn "hydra.TestConfigFcns.duplicate(\"true\",    ${${A}Hosts})" ncf
+                                                  fcn "hydra.TestConfigFcns.duplicate(\"true\",    ${${B}Hosts})" ncf
+                                                  fcn "hydra.TestConfigFcns.duplicate(\"false\",    ${${C}Hosts})" ncf;
+
+hydra.GemFirePrms-enableMcast		        = fcn "hydra.TestConfigFcns.duplicate(\"false\",    ${${A}Hosts})" ncf
+                                                  fcn "hydra.TestConfigFcns.duplicate(\"false\",    ${${B}Hosts})" ncf   
+                                                  fcn "hydra.TestConfigFcns.duplicate(\"false\",    ${${C}Hosts})" ncf;
+
+hydra.GemFirePrms-distributedSystem		= fcn "hydra.TestConfigFcns.duplicate(\"ds\",    ${${A}Hosts})" ncf
+		                                  fcn "hydra.TestConfigFcns.duplicate(\"ds\",    ${${B}Hosts})" ncf
+					          fcn "hydra.TestConfigFcns.duplicate(\"loner\", ${${C}Hosts})" ncf;
+
+
+hydra.log.LogPrms-file_logLevel			= fine;
+//hydra.GemFirePrms-logLevel              	= fine;
+//hydra.HostPrms-hostNames			= fcn "hydra.TestConfigFcns.duplicate(\"halibut\",  ${${A}Hosts})" ncf
+//						  fcn "hydra.TestConfigFcns.duplicate(\"halibut\",  ${${B}Hosts})" ncf
+//						  fcn "hydra.TestConfigFcns.duplicate(\"halibut\", ${${C}Hosts})" ncf;
+
+hydra.PartitionPrms-names       		= pr1;
+hydra.PartitionPrms-redundantCopies 		= 0;
+
+hydra.RegionPrms-names                  	= serverRegion					clientRegion;
+hydra.RegionPrms-regionName     		= Portfolio					Portfolio;
+hydra.RegionPrms-valueConstraint     		= com.gemstone.databrowser.objects.Portfolio	com.gemstone.databrowser.objects.Portfolio;
+hydra.RegionPrms-interestPolicy         	= All						All;
+hydra.RegionPrms-scope                  	= default               			local;
+hydra.RegionPrms-dataPolicy     		= replicate					normal;
+hydra.RegionPrms-partitionName  		= none                  			none;
+hydra.RegionPrms-multicastEnabled 		= true                  			false;
+hydra.RegionPrms-poolName			= none						edgeDescript;
+hydra.RegionPrms-keyConstraint			= java.lang.String      			java.lang.String;
+hydra.RegionPrms-statisticsEnabled		= true;
+
+//Pool attributes.
+hydra.PoolPrms-names				= edgeDescript;
+hydra.PoolPrms-minConnections			= 10;
+hydra.PoolPrms-maxConnections			= 50;
+hydra.PoolPrms-subscriptionEnabled		= true;
+hydra.PoolPrms-threadLocalConnections		= true;
+hydra.PoolPrms-readTimeout			= 60000;
+hydra.PoolPrms-subscriptionRedundancy		= 0;
+hydra.PoolPrms-idleTimeout			= -1;
+hydra.PoolPrms-statisticInterval		= 5000;
+
+
+// For security enabling. 
+//hydra.GemFirePrms-securityName		= dummyScheme;
+//hydra.GemFirePrms-locatorSecurityName		= dummyScheme;
+//hydra.SecurityPrms-names			= dummyScheme ;
+//hydra.SecurityPrms-peerAuthInit		= admin.security.DataBrowserAuthInit.create;
+//hydra.SecurityPrms-peerAuthenticator		= admin.security.DataBrowserAuthenticator.create ;
+//hydra.SecurityPrms-peerExtraProperties	= admin.security.DummyUserPasswordPrms ;
+//admin.security.DummyUserPasswordPrms-username	= Gem;
+//admin.security.DummyUserPasswordPrms-password	= Gem;
+		  
+hydra.VmPrms-type                       	= fcn "hydra.TestConfigFcns.duplicate(\"server\",  ${bridgeHosts})" ncf
+						  fcn "hydra.TestConfigFcns.duplicate(\"client\",  ${edgeHosts})" ncf;
+
+hydra.VmPrms-extraClassPaths        		= $GEMFIRE/lib/antlr.jar 
+						  $GEMFIRE/lib/gemfire.jar
+						  $GEMFIRE/lib/commons-logging.jar
+                                                  $GEMFIRE/lib/commons-modeler-2.0.jar
+						  $GEMFIRE/lib/mx4j.jar
+                                                  $GEMFIRE/lib/mx4j-remote.jar
+                                                  $GEMFIRE/lib/mx4j-tools.jar
+                                                  $GEMFIRE/lib/mail.jar;
+                                                                                                
+// Server Entities Setup
+admin.jmx.RecyclePrms-numberOfEntitiesInRegion 	= 2;
+admin.jmx.RecyclePrms-sleepBetweenCycles   	= 120;
+admin.jmx.RecyclePrms-edgeCacheConfig		= edge;
+admin.jmx.RecyclePrms-edgeRegionConfig		= clientRegion;
+//admin.jmx.RecyclePrms-edgeConfig		= edgeDescript;
+
+
+
+query.QueryPrms-queryStrings 			= "select distinct * from /Portfolio";
+						  //"select * from /Portfolio"
+						  //"select * from /Portfolio.values"
+						  //"select distinct * from /Portfolio.keySet"
+						  //"/Portfolio.size"
+						  //"select ID,status from /Portfolio pf"
+						  //"select pkid from /Portfolio pf where status ='active'"						  
+						  //"select pkid from /Portfolio pf where status ='active' and ID = 50"						  
+						  //"select names[1] from /Portfolio where status='active'"
+						  //"select secIds[3],ID from pf in /Portfolio where pf.description='Info'"
+						  //"select pf from pf in /Portfolio where status = 'active'"
+						  //"(select distinct * from /Portfolio where status = 'active').size"	
+						  //"SELECT DISTINCT * FROM /Portfolio pf WHERE pf.isActive"
+						  //"select distinct pf.pkid from /Portfolio pf"						  
+						  //"SELECT DISTINCT * FROM /Portfolio WHERE positions.size = 1"
+						  //"SELECT DISTINCT positions FROM /Portfolio WHERE status = 'active'"						  
+                                                  //"SELECT DISTINCT pf FROM /Portfolio pf WHERE status = 'active'"						
+						  //"SELECT DISTINCT * FROM /Portfolio WHERE ID != 50"
+						  //"select distinct posns.country from /Portfolio,positions.values posns where posns.secId = 'A3'"
+						  //"IMPORT com.gemstone.databrowser.objects.positions;select distinct posns.mktValue from /Portfolio,positions.values posns TYPE positions where status = 'active'"
+						  //"IMPORT com.gemstone.databrowser.objects.positions;SELECT DISTINCT posns.secId FROM /Portfolio,positions.values posns TYPE positions WHERE status = 'active'"			  
+						  //"IMPORT com.gemstone.databrowser.objects.positions;SELECT posns.mktValue FROM /Portfolio,(collection<positions>)positions.values posns"
+						  //"IMPORT com.gemstone.databrowser.objects.positions;SELECT DISTINCT * FROM /Portfolio,positions.values posEntry where status = 'active'"
+						  //"IMPORT com.gemstone.databrowser.objects.positions;SELECT DISTINCT * FROM /Portfolio pf,positions.values posns TYPE positions WHERE posns.mktValue = 99.1 AND (pf.description = 'Info' OR posns.country = 'Indi')"
+						  //"SELECT DISTINCT * FROM /Portfolio,positions.values posns WHERE posns.secId ='A3'"
+						  //"SELECT DISTINCT * FROM /Portfolio,positions.values posns WHERE posns.secId <>'A3'"
+						  //"select distinct posns.secId,posns.country,posns.issuer from /Portfolio,positions.values posns where posns.bondRating = 'medium'"
+						  //"select distinct * from /Portfolio,positions.values posns where posns.bondRating ='medium'"
+						  //"select distinct posns.bondRating from /Portfolio,positions.values posns where posns.country = 'UK'"
+						  //"select distinct * from /Portfolio,positions.values posns where posns.bondRating='medium' or posns.bondRating='low'"						  
+					          //"SELECT DISTINCT * FROM /Portfolio WHERE NOT positions.isEmpty" 
+						  //"SELECT DISTINCT * FROM /Portfolio WHERE positions.isEmpty" //Returns set of Portfolios with no positions.
+						  //"SELECT DISTINCT * FROM /Portfolio pflo,positions.values posns WHERE IS_UNDEFINED(posns.bondRating)"	
+						  //"SELECT DISTINCT * FROM /Portfolio pf WHERE pf.isActive"
+						  //"SELECT DISTINCT * FROM /Portfolio WHERE NOT(SELECT DISTINCT * FROM positions.values p WHERE p.secId = 'A1').isEmpty"
+						  //"SELECT DISTINCT * FROM /Portfolio /* This one is a comment */ WHERE status = 'active'"
+						  //"SELECT DISTINCT * FROM /Portfolio WHERE status = 'active'--This is another one line comment"	
+						  //"/Portfolio.keys"
+						  //"/Portfolio.hashCode"
+						  //"select distinct * from /Portfolio where TRUE"
+						  //"select distinct * from /Portfolio where 1=1"
+  						  //"select distinct port from /Portfolio port where IS_UNDEFINED(UNDEFINED)"
+						  //"select distinct * from /Portfolio where ID = NULL"    // returns empty []
+						  //"select distinct * from /Portfolio where ID = UNDEFINED"  // returns empty []
+						  //"select distinct * from /Portfolio where NULL"   // returns empty []
+						  //"select distinct * from /Portfolio where UNDEFINED"   // returns empty []						  
+						  //"select distinct * from /Portfolio where 'a'<>'a'"  // empty []
+						  //"select distinct port from /Portfolio port, port.positions.values where FALSE" // returns empty []
+						  //"select distinct port from /Portfolio port, port.positions.values where UNDEFINED = 1" // returns empty []
+						  //"select distinct * from /Portfolio port where IS_DEFINED(TRUE)"
+						  //"select distinct * from /Portfolio port where IS_UNDEFINED(ID)"  // returns empty []
+						  //"select distinct nvl(NULL, 'foundNull') from /Portfolio" 
+						  //"select distinct nvl('notNull', 'foundNull')  = 'notNull' from /Portfolio"
+						  //"select distinct nvl('notNull', 'foundNull') from /Portfolio"
+					          //"select distinct * from /Portfolio pf where nvl(pf.positions,'foundNull') = 'foundNull'"  // returns empty []
+						  //"select distinct nvl(pf.positions, 'inProjection') from /Portfolio pf where nvl(pf.positions,'foundNull') = 'foundNull'"  // returns empty []
+						  //"select distinct x.value from /Portfolio.entrySet x where x.value.status = ELEMENT(select distinct p.value from /Portfolio.entrySet p where x.key = p.key).status"
+						  //"select distinct p from /Portfolio p,(select distinct * from /Portfolio x, x.positions as myPos) where myPos.value.secId = 'A1'"
+						  //"select distinct to_date('06/01/09','dd/mm/yy') from /Portfolio"
+						  //"select /Portfolio.size from set(0)"
+						  //"(select * from /Portfolio).size"
+						  //"select distinct getPositions, getPositions from /Portfolio where TRUE"
+						  //"select distinct port.ID, port.pkid, port.getType from /Portfolio port where IS_UNDEFINED(UNDEFINED)"
+						  //"select distinct nvl(NULL, 'foundNull')='foundNull', 'dummy Col' from /Portfolio"
+						  //"select distinct nvl('notNull', 'foundNull') as NtNul , 'dummy Col' as Dumbo from /Portfolio"
+						  //"select distinct nvl(pf.positions, 'inProjection'), 'dummy Col' from /Portfolio pf where nvl(pf.positions,'foundNull') = 'foundNull'"
+						  //"select distinct keys, v.key, v.value.ID, v.value.toString from /Portfolio.keys keys, /Portfolio.entrySet v where v.value.toString in (select distinct p.toString from /Portfolio p where p.ID = v.value.ID) and keys = v.key"
+						  //"Select distinct ID, positions  from /Portfolio"
+						  //"select distinct to_date('01/06/2009 03:848 PM','mm/dd/yyyy hh:sss a') as twoeighty, to_date('02/07/2009','mm/dd/yyyy'), to_date('03/08/1900 00:2753 PM','mm/dd/yyyy hh:ssss a') from /Portfolio"
+						  //"select distinct to_date('01/19/2038 03:848 AM','mm/dd/yyyy hh:sss') as twoeighty, to_date('01/19/2038','mm/dd/yyyy'), to_date('12/14/1901 00:2753 AM','mm/dd/yyyy hh:ssss') from /Portfolio"
+						  //"select pos.secId from /Portfolio,positions.values pos"
+						  //"Select positions  from /Portfolio"
+						  //"select positions from /Portfolio pf ,positions where pf.pkid = 'main'"
+						  //"SELECT pf.positions FROM /Portfolio pf WHERE pf.ID = 50"
+						  //"select positions from /Portfolio pf where pf.pkid = 'main'"
+  						  //"select posns.country from /Portfolio pf,positions.values posns where posns.mktValue >30.0"
+						  //"select * from /Portfolio where pkid like 'main'"
+						  //"select * from /Portfolio pf where pf->description like 'Info'"
+						  //"select distinct * from /Portfolio where \"type\" = 'XYZ' and status ='active'"
+						  //"SELECT DISTINCT key, entry.value.ID,posnVal.secId FROM /Portfolio.entrySet entry, entry.value.positions.values posnVal WHERE entry.value.\"type\" = 'XYZ' AND posnVal.secId = 'A1'"
+						  //"select posns.country from /Portfolio pf,positions.values posns"
+ 						  //"/Portfolio"
+  						  //"SELECT DISTINCT * FROM /Portfolio pflo WHERE IS_UNDEFINED(pflo.status)"
+						  //"IMPORT com.gemstone.databrowser.objects.positions;select posns.secId,posns.mktValue from /Portfolio pf,positions.values posns TYPE positions where status = 'active' and pf.description = posns.secLinks"
+						  					
+
+						   						  						    						 					          					
+						    						  						  						    						  				
+
+THREADGROUP bridgeServer
+    totalThreads = ${bridgeHosts}
+    totalVMs = ${bridgeHosts}
+    clientNames  = fcn "hydra.TestConfigFcns.generateNames(\"bridge\", ${bridgeHosts}, true)" ncf;
+
+THREADGROUP agentForDS1
+    totalThreads = ${agentHosts}
+    totalVMs = ${agentHosts}
+    clientNames  = fcn "hydra.TestConfigFcns.generateNames(\"agent\", ${agentHosts}, true)" ncf;
+
+THREADGROUP edge
+    totalThreads = ${edgeHosts}
+    totalVMs = ${edgeHosts}
+    clientNames  = fcn "hydra.TestConfigFcns.generateNames(\"edge\", ${edgeHosts}, true)" ncf;
+    
+
+INITTASK  taskClass = admin.jmx.JMXHelper
+	  taskMethod = startJMXAgent
+	  hydra.ConfigPrms-agentConfig = agent1
+	  threadgroups = agentForDS1
+          runMode = always
+      	  ;
+
+INITTASK  taskClass = com.gemstone.databrowser.CustomDataGenerator
+          taskMethod = startServerCache
+          threadGroups = bridgeServer	  
+          ;
+                                      
+INITTASK  taskClass = com.gemstone.databrowser.CustomDataGenerator
+          taskMethod = populateRegions
+          threadGroups = bridgeServer
+          ;          
+
+INITTASK  taskClass = com.gemstone.databrowser.CustomDataGenerator
+	  taskMethod = startEdgeClient
+          threadGroups = edge
+          ;	
+          
+          
+INITTASK  taskClass = com.gemstone.databrowser.CustomDataGenerator
+	  taskMethod = performAndExecuteQuery
+          threadGroups = edge
+          ;	
+          
+TASK  	  taskClass = com.gemstone.databrowser.CustomDataGenerator
+          taskMethod = RegionEntryUpdate
+          threadGroups = bridgeServer ,edge          
+          ;                  
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/battery/conf/startserverTest.bt
----------------------------------------------------------------------
diff --git a/databrowser/tests/battery/conf/startserverTest.bt b/databrowser/tests/battery/conf/startserverTest.bt
new file mode 100644
index 0000000..7893d4f
--- /dev/null
+++ b/databrowser/tests/battery/conf/startserverTest.bt
@@ -0,0 +1,5 @@
+conf/serverTest.conf
+A = bridge  bridgeHosts =  2 bridgeVMsPerHost = 1  bridgeThreadsPerVM = 1
+B = agent   agentHosts  =  1 agentVMsPerHost  = 1  agentThreadsPerVM  = 1
+C = edge    edgeHosts   =  1 edgeVMsPerHost   = 1  edgeThreadsPerVM   = 1
+hc.nPutThreads= 3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Address.java
----------------------------------------------------------------------
diff --git a/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Address.java b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Address.java
new file mode 100644
index 0000000..345a4b7
--- /dev/null
+++ b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Address.java
@@ -0,0 +1,55 @@
+package com.gemstone.gemfire.tools.databrowser.data;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+
+public class Address implements DataSerializable {
+
+  private String street1;
+  private String city;
+  private int postalCode; 
+  
+  
+  public Address() {
+    this.street1 = null;
+    this.city = null;
+    this.postalCode = 0;
+  }
+   
+  public Address(String street1 , String city , int postalCode) {
+    super();
+    this.city = city;
+    this.postalCode = postalCode;
+    this.street1 = street1;
+  }
+
+  public String getStreet1() {
+    return street1;
+  }
+
+  public String getCity() {
+    return city;
+  }
+
+  public int getPostalCode() {
+    return postalCode;
+  }
+
+  public void fromData(DataInput arg0) throws IOException,
+      ClassNotFoundException {
+    this.street1 = DataSerializer.readString(arg0) ;
+    this.city = DataSerializer.readString(arg0) ;
+    this.postalCode = DataSerializer.readPrimitiveInt(arg0);
+  }
+  
+  public void toData(DataOutput arg0) throws IOException {
+    DataSerializer.writeString(this.street1, arg0);
+    DataSerializer.writeString(this.city, arg0);
+    DataSerializer.writePrimitiveInt(this.postalCode, arg0);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/ConfigurableObject.java
----------------------------------------------------------------------
diff --git a/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/ConfigurableObject.java b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/ConfigurableObject.java
new file mode 100644
index 0000000..b4326c7
--- /dev/null
+++ b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/ConfigurableObject.java
@@ -0,0 +1,48 @@
+/*=========================================================================
+ * (c) Copyright 2002-2007, GemStone Systems, Inc. All Rights Reserved.
+ * 1260 NW Waterhouse Ave., Suite 200,  Beaverton, OR 97006
+ * All Rights Reserved.
+ *========================================================================
+ */
+
+package com.gemstone.gemfire.tools.databrowser.data;
+
+/**
+ *  Interface for configurable objects that encode an <code>int</code>
+ *  key ("index").  An object type can be configured using its
+ *  corresponding parameter class, if one exists.
+ */
+
+public interface ConfigurableObject {
+
+  /**
+   *  Returns a new instance of the object encoded with the index.
+   *
+   *  @throws ObjectCreationException
+   *          An error occured when creating the object.  See the error
+   *          message for more details.
+   */
+  public void init( int index );
+
+  /**
+   *  Returns the index encoded in the object.
+   *
+   *  @throws ObjectAccessException
+   *          An error occured when accessing the object.  See the error
+   *          message for more details.
+   */
+  public int getIndex();
+
+  /**
+   *  Validates whether the index is encoded in the object, if this
+   *  applies, and performs other validation checks as needed.
+   *
+   *  @throws ObjectAccessException
+   *          An error occured when accessing the object.  See the error
+   *          message for more details.
+   *  @throws ObjectValidationException
+   *          The object failed validation.  See the error message for more
+   *          details.
+   */
+  public void validate( int index );
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Customer.java
----------------------------------------------------------------------
diff --git a/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Customer.java b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Customer.java
new file mode 100644
index 0000000..3cd6eb3
--- /dev/null
+++ b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Customer.java
@@ -0,0 +1,75 @@
+package com.gemstone.gemfire.tools.databrowser.data;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+
+/**
+ * Test objects.
+ * 
+ * @author vreddy
+ * 
+ */
+public class Customer implements DataSerializable {
+
+  //State of this object.
+  private Integer id;
+  private String name;
+  private String address;  
+
+  public Customer() {
+    //Do nothing.
+  }
+
+  public Customer(int cid, String cnm, String cads) {
+    this.id = Integer.valueOf(cid);
+    this.name = cnm;
+    this.address = cads;
+  }
+
+  public void setId(Integer id) {
+    this.id = id;
+  }
+
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  public void setAddress(String address) {
+    this.address = address;
+  }
+
+  public Integer getId() {
+    return id;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public String getAddress() {
+    return address;
+  }
+
+  public void toData(DataOutput out) throws IOException {
+    DataSerializer.writeInteger(id, out);
+    DataSerializer.writeString(name, out);
+    DataSerializer.writeString(address, out);
+  }
+
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    this.id = DataSerializer.readInteger(in);
+    this.name = DataSerializer.readString(in);
+    this.address = DataSerializer.readString(in);
+  }
+
+  @Override
+  public String toString() {
+    StringBuffer buffer = new StringBuffer();
+    buffer.append("Customer [ name :"+this.name+" , address :"+this.address+"]");
+    return buffer.toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/GemStoneCustomer.java
----------------------------------------------------------------------
diff --git a/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/GemStoneCustomer.java b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/GemStoneCustomer.java
new file mode 100644
index 0000000..146d793
--- /dev/null
+++ b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/GemStoneCustomer.java
@@ -0,0 +1,65 @@
+package com.gemstone.gemfire.tools.databrowser.data;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+
+public class GemStoneCustomer implements DataSerializable {
+  
+  private int id;
+  private String name;
+  private Address address;
+  private ArrayList<Product> products;
+  
+  public GemStoneCustomer() {
+    super();
+    this.id = 0;
+    this.name = null;
+    this.address = null;
+    this.products = null;
+  }
+    
+  public GemStoneCustomer(int id, String name,Address address,
+      ArrayList<Product> products) {
+    super();
+    this.address = address;
+    this.id = id;
+    this.name = name;
+    this.products = products;
+  }
+
+  public List<Product> getProducts() {
+    return this.products;
+  }
+    
+  public int getId() {
+    return this.id;
+  }
+
+  public String getName() {
+    return this.name;
+  }
+
+  public Address getAddress() {
+    return this.address;
+  }
+
+  public void toData(DataOutput out) throws IOException {
+    DataSerializer.writeInteger(id, out);
+    DataSerializer.writeString(name, out);
+    DataSerializer.writeObject(this.address, out);
+    DataSerializer.writeArrayList(this.products, out);
+  }
+
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    this.id = DataSerializer.readInteger(in);
+    this.name = DataSerializer.readString(in);
+    this.address = (Address)DataSerializer.readObject(in);
+    this.products = DataSerializer.readArrayList(in);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/ObjectCreationException.java
----------------------------------------------------------------------
diff --git a/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/ObjectCreationException.java b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/ObjectCreationException.java
new file mode 100644
index 0000000..431ff3c
--- /dev/null
+++ b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/ObjectCreationException.java
@@ -0,0 +1,27 @@
+package com.gemstone.gemfire.tools.databrowser.data;
+
+public class ObjectCreationException extends RuntimeException {
+
+  public ObjectCreationException() {
+    super();
+    // TODO Auto-generated constructor stub
+  }
+
+  public ObjectCreationException(String message, Throwable cause) {
+    super(message, cause);
+    // TODO Auto-generated constructor stub
+  }
+
+  public ObjectCreationException(String message) {
+    super(message);
+    // TODO Auto-generated constructor stub
+  }
+
+  public ObjectCreationException(Throwable cause) {
+    super(cause);
+    // TODO Auto-generated constructor stub
+  }
+  
+  
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/ObjectHelper.java
----------------------------------------------------------------------
diff --git a/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/ObjectHelper.java b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/ObjectHelper.java
new file mode 100644
index 0000000..d33eba6
--- /dev/null
+++ b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/ObjectHelper.java
@@ -0,0 +1,84 @@
+/*=========================================================================
+ * (c) Copyright 2002-2007, GemStone Systems, Inc. All Rights Reserved.
+ * 1260 NW Waterhouse Ave., Suite 200,  Beaverton, OR 97006
+ * All Rights Reserved.
+ *========================================================================
+ */
+
+package com.gemstone.gemfire.tools.databrowser.data;
+
+import hydra.*;
+
+/**
+ *
+ *  Object creation helper used to create configurable objects encoded with
+ *  an index.  Supported objects must either implement {@link ConfigurableObject}
+ *  or be special-cased.  They can optionally rely on a parameter class for
+ *  configuration.  See the various datatypes in this directory for examples.
+ *  <p>
+ *  Usage example:
+ *  <blockquote>
+ *  <pre>
+ *     // In a hydra configuration file...
+ *     objects.SizedStringPrms-size = 1024; // create strings of size 1K
+ *
+ *     // In one vm...
+ *     Object name = ObjectHelper.createName( i );
+ *     Object value = ObjectHelper.createObject( "objects.SizedString", i );
+ *     cache.put( name, value );
+ *
+ *     // In a different vm...
+ *     Object name = ObjectHelper.createName( i );
+ *     Object value = cache.get( name );
+ *     ObjectHelper.validate( i, value );
+ *  </pre>
+ *  </blockquote>
+ */
+
+public class ObjectHelper {
+  
+  //----------------------------------------------------------------------------
+  // Helper methods
+  //----------------------------------------------------------------------------
+
+  /**
+   * Generates an object name of type java.lang.String encoding the supplied
+   * index.
+   */
+  public static Object createName( int index ) {
+    return String.valueOf( index );
+  }
+
+
+
+  /**
+   *  Generates an object of the specified type encoding the specified index,
+   *  using the settings in the corresponding parameter class for the type, if
+   *  any.  Invokes {@link ConfigurableObject#init} on the object, if it
+   *  applies, otherwise handles specially supported types.
+   *
+   *  @throws HydraConfigException
+   *          The class is not a supported type or could not be found.
+   *  @throws ObjectCreationException
+   *          An error occured when creating the object.  See the error
+   *          message for more details.
+   */
+  public static Object createObject( String classname, int index ) {
+      try {
+	Class cls = Class.forName( classname );
+	ConfigurableObject obj = (ConfigurableObject) cls.newInstance();
+	obj.init( index );
+	return obj;
+      } catch( ClassCastException e ) {
+	throw new HydraConfigException( classname + " is neither a specially supported type nor a ConfigurableObject", e );
+      } catch( ClassNotFoundException e ) {
+	throw new HydraConfigException( "Unable to find class for type " + classname, e );
+      } catch( IllegalAccessException e ) {
+	throw new ObjectCreationException( "Unable to instantiate object of type " + classname, e );
+      } catch( InstantiationException e ) {
+	throw new ObjectCreationException( "Unable to instantiate object of type " + classname, e );
+      }
+    }
+}
+
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Portfolio.java
----------------------------------------------------------------------
diff --git a/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Portfolio.java b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Portfolio.java
new file mode 100644
index 0000000..6c7f4c8
--- /dev/null
+++ b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Portfolio.java
@@ -0,0 +1,80 @@
+package com.gemstone.gemfire.tools.databrowser.data;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.HashMap;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+
+public class Portfolio implements DataSerializable {
+
+  String id; /* This id is used as the entry key and is stored here */
+  String type;
+  String status;
+  HashMap<String, Position> positions; /* The value is the Position, with secId used as the key*/
+    
+  public Portfolio() {
+    
+  }  
+  
+  public String getId() {
+    return id;
+  }
+  
+  public void setId(String id) {
+    this.id = id;
+  }
+
+  public String getType() {
+    return type;
+  }
+
+  public void setType(String type) {
+    this.type = type;
+  }
+
+  public String getStatus() {
+    return status;
+  }
+
+  public void setStatus(String status) {
+    this.status = status;
+  }
+  
+  public HashMap<String, Position> getPositions() {
+    return positions;
+  }
+  
+  public void setPositions(HashMap<String, Position> positions) {
+    this.positions = positions;
+  }
+
+  public Portfolio(String id, HashMap<String, Position> positions,
+      String status, String type) {
+    super();
+    this.id = id;
+    this.positions = positions;
+    this.status = status;
+    this.type = type;
+  }
+
+
+  public void fromData(DataInput arg0) throws IOException,
+      ClassNotFoundException {
+    this.id = DataSerializer.readString(arg0);
+    this.type = DataSerializer.readString(arg0);
+    this.status = DataSerializer.readString(arg0);
+    this.positions = DataSerializer.readHashMap(arg0);
+  }
+
+
+  public void toData(DataOutput arg0) throws IOException {
+    DataSerializer.writeString(this.id, arg0);   
+    DataSerializer.writeString(this.id, arg0);
+    DataSerializer.writeString(this.id, arg0);
+    DataSerializer.writeHashMap(this.positions, arg0);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Position.java
----------------------------------------------------------------------
diff --git a/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Position.java b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Position.java
new file mode 100644
index 0000000..b86754b
--- /dev/null
+++ b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Position.java
@@ -0,0 +1,66 @@
+package com.gemstone.gemfire.tools.databrowser.data;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+
+public class Position implements DataSerializable {
+
+  private String secId;
+  private double mktValue;
+  private double qty;
+  
+  public Position() {
+    
+  }
+    
+  public Position(String secId, double mktValue, double qty ) {
+    super();
+    this.mktValue = mktValue;
+    this.qty = qty;
+    this.secId = secId;
+  }
+
+  public String getSecId() {
+    return secId;
+  }
+
+  public void setSecId(String secId) {
+    this.secId = secId;
+  }
+
+  public double getMktValue() {
+    return mktValue;
+  }
+
+  public void setMktValue(double mktValue) {
+    this.mktValue = mktValue;
+  }
+
+  public double getQty() {
+    return qty;
+  }
+
+  public void setQty(double qty) {
+    this.qty = qty;
+  }
+
+
+  public void fromData(DataInput arg0) throws IOException,
+      ClassNotFoundException {
+    this.secId = DataSerializer.readString(arg0);
+    this.mktValue = DataSerializer.readPrimitiveDouble(arg0);
+    this.qty = DataSerializer.readPrimitiveDouble(arg0);
+  }
+
+
+  public void toData(DataOutput arg0) throws IOException {
+    DataSerializer.writeString(this.secId, arg0);
+    DataSerializer.writePrimitiveDouble(this.mktValue, arg0);
+    DataSerializer.writePrimitiveDouble(this.qty , arg0);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Product.java
----------------------------------------------------------------------
diff --git a/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Product.java b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Product.java
new file mode 100644
index 0000000..b6bc869
--- /dev/null
+++ b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/data/Product.java
@@ -0,0 +1,51 @@
+package com.gemstone.gemfire.tools.databrowser.data;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+
+public class Product implements DataSerializable {
+
+  private int id;
+  private String name;
+  private float price;
+  
+  public Product() {
+    //Do nothing.
+  }
+  
+  public Product(int id, String name, float price) {
+    this.id = id;
+    this.name = name;
+    this.price = price;
+  }
+    
+  public int getId() {
+    return id;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public float getPrice() {
+    return price;
+  }
+
+  public void fromData(DataInput arg0) throws IOException,
+      ClassNotFoundException {
+    this.id = DataSerializer.readPrimitiveInt(arg0);
+    this.name = DataSerializer.readString(arg0);
+    this.price = DataSerializer.readPrimitiveFloat(arg0);
+  }
+
+  public void toData(DataOutput arg0) throws IOException {
+    DataSerializer.writePrimitiveInt(this.id, arg0);
+    DataSerializer.writeString(this.name, arg0);
+    DataSerializer.writeFloat(this.price, arg0);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2ccf3da/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/dunit/CompositeObjectDUnitTest.java
----------------------------------------------------------------------
diff --git a/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/dunit/CompositeObjectDUnitTest.java b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/dunit/CompositeObjectDUnitTest.java
new file mode 100644
index 0000000..02c773d
--- /dev/null
+++ b/databrowser/tests/dunit/com/gemstone/gemfire/tools/databrowser/dunit/CompositeObjectDUnitTest.java
@@ -0,0 +1,300 @@
+package com.gemstone.gemfire.tools.databrowser.dunit;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Collection;
+import java.util.Iterator;
+
+import junit.framework.Assert;
+
+import java.util.Arrays;
+import com.gemstone.gemfire.mgmt.DataBrowser.model.member.GemFireMember;
+import com.gemstone.gemfire.mgmt.DataBrowser.query.IntrospectionResult;
+import com.gemstone.gemfire.mgmt.DataBrowser.query.QueryExecutionException;
+import com.gemstone.gemfire.mgmt.DataBrowser.query.QueryResult;
+import com.gemstone.gemfire.mgmt.DataBrowser.query.ResultSet;
+import com.gemstone.gemfire.tools.databrowser.data.Address;
+import com.gemstone.gemfire.tools.databrowser.data.GemStoneCustomer;
+import com.gemstone.gemfire.tools.databrowser.data.Product;
+
+import dunit.SerializableRunnable;
+
+public class CompositeObjectDUnitTest extends DataBrowserDUnitTestCase {
+
+  public CompositeObjectDUnitTest(String name) {
+    super(name); 
+  }
+  
+  @Override
+  public void populateData() {
+    List result = new ArrayList();
+    
+    ArrayList<Product> products = new ArrayList<Product>();
+    products.add(new Product(1, "GemFire Enterprise", 40));
+    
+    Address address = new Address("Road1","Pune",41101);
+    
+    result.add(new GemStoneCustomer(1, "Tom", address ,products));
+    result.add(new GemStoneCustomer(2, "Harry", null ,null));
+    
+    products = new ArrayList<Product>();
+    products.add(new Product(2, "GemFire Enterprise Monitoring", 0));
+    result.add(new GemStoneCustomer(3, "Dick", address ,products));
+        
+    populateRegion(DEFAULT_REGION_PATH, result.toArray()); 
+  }  
+  
+  public void testCustomerObjectQuery() {
+    browser.invoke(new SerializableRunnable() {
+      public void run() {
+//        GemFireMember[] members = connection.getMembers();
+//        
+//        Assert.assertEquals(1, members.length);
+//        Assert.assertEquals(GemFireMember.GEMFIRE_CACHE_SERVER, members[0].getType());
+        
+        String queryString = "SELECT * FROM "+DEFAULT_REGION_PATH + " WHERE id = 1";
+        QueryResult result = null;
+        try {
+          result = connection.executeQuery(queryString, null);
+          Assert.assertNotNull(result); 
+        }
+        catch (QueryExecutionException e) {
+          fail("Failed to execute query through data browser",e);
+        }
+        
+        IntrospectionResult [] result_t = result.getIntrospectionResult();
+        Assert.assertEquals(1, result_t.length);
+        IntrospectionResult metaInfo = result_t[0];
+        
+        Assert.assertEquals(4, metaInfo.getColumnCount());
+        
+        List fields = Arrays.asList(new String[]{"name", "id", "address", "products"});
+        List classtypes = Arrays.asList(new String[]{"java.lang.String", "int",
+                                                     "com.gemstone.gemfire.tools.databrowser.data.Address",
+                                                     "java.util.List"});
+        List<Integer> columntypes = Arrays.asList(new Integer[] {IntrospectionResult.PRIMITIVE_TYPE_COLUMN,
+                                                                 IntrospectionResult.PRIMITIVE_TYPE_COLUMN,
+                                                                 IntrospectionResult.UNKNOWN_TYPE_COLUMN,
+                                                                 IntrospectionResult.COLLECTION_TYPE_COLUMN});
+
+        verifyType(metaInfo, GemStoneCustomer.class, fields, classtypes, columntypes);       
+        
+        Collection temp = result.getQueryResult();    
+        Iterator iter = temp.iterator();
+        Assert.assertEquals(1, temp.size());        
+        Object tuple = iter.next();
+        
+        try {
+          int index = metaInfo.getColumnIndex("products");
+          Object columnVal = result.getColumnValue(tuple, index);
+          
+          Assert.assertTrue(columnVal instanceof ResultSet);
+          
+          ResultSet rset = (ResultSet)columnVal;
+          
+          IntrospectionResult[] c_result =  rset.getIntrospectionResult();
+          Assert.assertEquals(1, c_result.length);
+          
+          IntrospectionResult metaInfo1  = c_result[0];
+          
+          Assert.assertEquals(3, metaInfo1.getColumnCount());
+          
+          fields = Arrays.asList(new String[]{"name", "id", "price" });
+          classtypes = Arrays.asList(new String[]{"java.lang.String","int","float"});
+          columntypes = Arrays.asList(new Integer[] {IntrospectionResult.PRIMITIVE_TYPE_COLUMN,
+                                                   IntrospectionResult.PRIMITIVE_TYPE_COLUMN,
+                                                   IntrospectionResult.PRIMITIVE_TYPE_COLUMN});
+          verifyType(metaInfo1, Product.class, fields, classtypes, columntypes);         
+        }
+        catch (Exception e) {
+          fail("Failed to execute test ",e);
+        }
+        
+        try {
+          int index = metaInfo.getColumnIndex("address");
+          Object columnVal = result.getColumnValue(tuple, index);
+          
+          Assert.assertTrue(columnVal instanceof Address);
+          
+          //With the new implementation, now the Composite objects are directly returned and no type
+          //conversion is performed. Hence the following code is not required.
+          
+//          ResultSet rset = (ResultSet)columnVal;
+//          
+//          IntrospectionResult[] c_result =  rset.getIntrospectionResult();
+//          Assert.assertEquals(1, c_result.length);
+//          
+//          metaInfo  = c_result[0];
+//          
+//          Assert.assertEquals(3, metaInfo.getColumnCount());
+//          
+//          fields = Arrays.asList(new String[]{"street1", "city", "postalCode" });
+//          classtypes = Arrays.asList(new String[]{"java.lang.String","java.lang.String", "int"});
+//          columntypes = Arrays.asList(new Integer[] {IntrospectionResult.PRIMITIVE_TYPE_COLUMN,
+//                                                   IntrospectionResult.PRIMITIVE_TYPE_COLUMN,
+//                                                   IntrospectionResult.PRIMITIVE_TYPE_COLUMN});
+//          verifyType(metaInfo, Address.class, fields, classtypes, columntypes);         
+        }
+        catch (Exception e) {
+          fail("Failed to execute test ",e);
+        }                            
+      }
+    });     
+  }
+  
+  public void testCompositeObjectWithNullValues() {
+    browser.invoke(new SerializableRunnable() {
+      public void run() {
+//        GemFireMember[] members = connection.getMembers();
+//        
+//        Assert.assertEquals(1, members.length);
+//        Assert.assertEquals(GemFireMember.GEMFIRE_CACHE_SERVER, members[0].getType());
+        
+        String queryString = "SELECT * FROM "+DEFAULT_REGION_PATH + " WHERE id = 2";
+        QueryResult result = null;
+        try {
+          result = connection.executeQuery(queryString, null);
+          Assert.assertNotNull(result); 
+        }
+        catch (QueryExecutionException e) {
+          fail("Failed to execute query through data browser",e);
+        }
+        
+        IntrospectionResult [] result_t = result.getIntrospectionResult();
+        Assert.assertEquals(1, result_t.length);
+        IntrospectionResult metaInfo = result_t[0];
+        
+        Assert.assertEquals(4, metaInfo.getColumnCount());
+        
+        List fields = Arrays.asList(new String[]{"name", "id", "address", "products"});
+        List classtypes = Arrays.asList(new String[]{"java.lang.String", "int",
+                                                     "com.gemstone.gemfire.tools.databrowser.data.Address",
+                                                     "java.util.List"});
+        List<Integer> columntypes = Arrays.asList(new Integer[] {IntrospectionResult.PRIMITIVE_TYPE_COLUMN,
+                                                                 IntrospectionResult.PRIMITIVE_TYPE_COLUMN,
+                                                                 IntrospectionResult.UNKNOWN_TYPE_COLUMN,
+                                                                 IntrospectionResult.COLLECTION_TYPE_COLUMN});
+
+        verifyType(metaInfo, GemStoneCustomer.class, fields, classtypes, columntypes);       
+        
+        Collection temp = result.getQueryResult(); 
+        Iterator iter = temp.iterator();
+        
+        Assert.assertEquals(1, temp.size());        
+        Object tuple = iter.next();
+        
+        try {
+          int index = metaInfo.getColumnIndex("products");
+          Object columnVal = result.getColumnValue(tuple, index);
+          
+          Assert.assertTrue(columnVal instanceof ResultSet);
+          
+          ResultSet rset = (ResultSet)columnVal;
+          
+          IntrospectionResult[] c_result =  rset.getIntrospectionResult();
+          Assert.assertEquals(0, c_result.length);
+        }
+        catch (Exception e) {
+          fail("Failed to execute test ",e);
+        }
+        
+        try {
+          int index = metaInfo.getColumnIndex("address");
+          Object columnVal = result.getColumnValue(tuple, index);
+          
+          Assert.assertTrue(columnVal == null);
+          
+          //With the new implementation, now the Composite objects are directly returned and no type
+          //conversion is performed. Hence the following code is not required.
+          
+//          ResultSet rset = (ResultSet)columnVal;
+//          
+//          Assert.assertEquals(0, rset.getQueryResult().size());
+//          
+//          IntrospectionResult[] c_result =  rset.getIntrospectionResult();
+//          Assert.assertEquals(1, c_result.length);
+//          
+//          metaInfo  = c_result[0];
+//          
+//          Assert.assertEquals(3, metaInfo.getColumnCount());
+//          
+//          fields = Arrays.asList(new String[]{"street1", "city", "postalCode" });
+//          classtypes = Arrays.asList(new String[]{"java.lang.String","java.lang.String", "int"});
+//          columntypes = Arrays.asList(new Integer[] {IntrospectionResult.PRIMITIVE_TYPE_COLUMN,
+//                                                   IntrospectionResult.PRIMITIVE_TYPE_COLUMN,
+//                                                   IntrospectionResult.PRIMITIVE_TYPE_COLUMN});
+//          verifyType(metaInfo, Address.class, fields, classtypes, columntypes);         
+        }
+        catch (Exception e) {
+          fail("Failed to execute test ",e);
+        }                     
+      }
+    });     
+  }
+  
+  public void testCollectionTypeQuery() {
+    browser.invoke(new SerializableRunnable() {
+      public void run() {
+//        GemFireMember[] members = connection.getMembers();
+//        
+//        Assert.assertEquals(1, members.length);
+//        Assert.assertEquals(GemFireMember.GEMFIRE_CACHE_SERVER, members[0].getType());
+        
+        String queryString = "SELECT products FROM "+DEFAULT_REGION_PATH +" WHERE id = 1 OR id = 3";
+        QueryResult result = null;
+        try {
+          result = connection.executeQuery(queryString, null);
+          Assert.assertNotNull(result); 
+        }
+        catch (QueryExecutionException e) {
+          fail("Failed to execute query through data browser",e);
+        }
+        
+        IntrospectionResult [] result_t = result.getIntrospectionResult();
+        Assert.assertEquals(1, result_t.length);
+        IntrospectionResult metaInfo = result_t[0];
+        
+        Assert.assertEquals(1, metaInfo.getColumnCount());
+        
+        {
+           List fields = Arrays.asList(new String[]{"Result"});
+           List classtypes = Arrays.asList(new String[]{"java.util.ArrayList"});
+           List<Integer> columntypes = Arrays.asList(new Integer[] {IntrospectionResult.COLLECTION_TYPE_COLUMN});
+           verifyType(metaInfo, java.util.ArrayList.class, fields, classtypes, columntypes);
+        }
+        
+        Collection temp = result.getQueryResult(); 
+        Iterator iter = temp.iterator();
+        Assert.assertEquals(2, temp.size());  
+        Object tuple = iter.next();
+        
+                
+        try {
+          tuple = result.getColumnValue(tuple, 0);
+          
+          Assert.assertTrue(tuple instanceof ResultSet);
+          ResultSet rset = (ResultSet)tuple;
+          Assert.assertEquals(1, rset.getQueryResult().size());
+                  
+          IntrospectionResult[] c_result =  rset.getIntrospectionResult();
+          Assert.assertEquals(1, c_result.length);
+          IntrospectionResult metaInfo1  = c_result[0];
+          
+          Assert.assertEquals(3, metaInfo1.getColumnCount());
+          
+          {
+            List fields = Arrays.asList(new String[]{"name", "id", "price" });
+            List classtypes = Arrays.asList(new String[]{"java.lang.String","int","float"});
+            List columntypes = Arrays.asList(new Integer[] {IntrospectionResult.PRIMITIVE_TYPE_COLUMN,
+                                                     IntrospectionResult.PRIMITIVE_TYPE_COLUMN,
+                                                     IntrospectionResult.PRIMITIVE_TYPE_COLUMN});
+            verifyType(metaInfo1, Product.class, fields, classtypes, columntypes);
+          }
+        }
+        catch (Exception e) {
+          fail("Failed to execute test ",e);
+        }
+      }
+    });     
+  }
+}


Mime
View raw message