com.salesforce.phoenix.util.ReadOnlyProps



API Populatity

1 Client projects

Project: com.salesforce

Project forcedotcom/phoenix in file ....salesforce.phoenix.iterate.ParallelIterators.java (2013-10-01)
@@ -28,8 +28,16 @@
 package com.salesforce.phoenix.iterate;
 
 import java.sql.SQLException;
-import java.util.*;
-import java.util.concurrent.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.NavigableSet;
+import java.util.UUID;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.hadoop.hbase.HRegionLocation;
 import org.apache.hadoop.hbase.client.Scan;
@@ -42,14 +50,22 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Function;
 import com.salesforce.phoenix.compile.GroupByCompiler.GroupBy;
-import com.salesforce.phoenix.compile.*;
+import com.salesforce.phoenix.compile.RowProjector;
+import com.salesforce.phoenix.compile.StatementContext;
 import com.salesforce.phoenix.job.JobManager.JobCallable;
 import com.salesforce.phoenix.parse.FilterableStatement;
 import com.salesforce.phoenix.parse.HintNode;
-import com.salesforce.phoenix.query.*;
+import com.salesforce.phoenix.query.ConnectionQueryServices;
+import com.salesforce.phoenix.query.KeyRange;
+import com.salesforce.phoenix.query.QueryConstants;
+import com.salesforce.phoenix.query.QueryServices;
 import com.salesforce.phoenix.schema.PTable;
 import com.salesforce.phoenix.schema.TableRef;
-import com.salesforce.phoenix.util.*;
+import com.salesforce.phoenix.util.ReadOnlyProps;
+import com.salesforce.phoenix.util.SQLCloseables;
+import com.salesforce.phoenix.util.ScanUtil;
+import com.salesforce.phoenix.util.SchemaUtil;
+import com.salesforce.phoenix.util.ServerUtil;
 
 
 /**
Project forcedotcom/phoenix in file ...com.salesforce.phoenix.jdbc.PhoenixTestDriver.java (2013-06-06)
@@ -32,7 +32,6 @@ import java.util.Properties;
 
 import com.salesforce.phoenix.end2end.ConnectionQueryServicesTestImpl;
 import com.salesforce.phoenix.query.*;
-import com.salesforce.phoenix.util.ReadOnlyProps;
 
 
 
@@ -46,19 +45,13 @@ import com.salesforce.phoenix.util.ReadOnlyProps;
  */
 public class PhoenixTestDriver extends PhoenixEmbeddedDriver {
     private ConnectionQueryServices queryServices;
-    private final ReadOnlyProps overrideProps;
     
     public PhoenixTestDriver() {
         this(new QueryServicesTestImpl());
     }
 
     public PhoenixTestDriver(QueryServices services) {
-        this(services, ReadOnlyProps.EMPTY_PROPS);
-    }
-
-    public PhoenixTestDriver(QueryServices services, ReadOnlyProps overrideProps) {
         super(services);
-        this.overrideProps = overrideProps;
     }
 
     @Override
@@ -77,7 +70,7 @@ public class PhoenixTestDriver extends PhoenixEmbeddedDriver {
         if (connInfo.isConnectionless()) {
             queryServices =  new ConnectionlessQueryServicesImpl(services);
         } else {
-            queryServices =  new ConnectionQueryServicesTestImpl(services, overrideProps);
+            queryServices =  new ConnectionQueryServicesTestImpl(services, connInfo);
         }
         queryServices.init(url, info);
         return queryServices;
@@ -85,6 +78,10 @@ public class PhoenixTestDriver extends PhoenixEmbeddedDriver {
     
     @Override
     public void close() throws SQLException {
-        queryServices.close();
+        try {
+            queryServices.close();
+        } finally {
+            queryServices = null;
+        }
     }
 }
Project forcedotcom/phoenix in file ...st.java.com.salesforce.phoenix.query.BaseTest.java (2013-06-06)
@@ -44,6 +44,7 @@ import com.google.common.collect.ImmutableMap;
 import com.salesforce.phoenix.jdbc.PhoenixTestDriver;
 import com.salesforce.phoenix.schema.TableAlreadyExistsException;
 import com.salesforce.phoenix.util.PhoenixRuntime;
+import com.salesforce.phoenix.util.ReadOnlyProps;
 
 public abstract class BaseTest {
     private static final Map<String,String> tableDDLMap;
@@ -270,11 +271,19 @@ public abstract class BaseTest {
         }
     }
 
-    protected static void startServer(String url) throws Exception {
-        PhoenixTestDriver driver = initDriver(new QueryServicesTestImpl());
+    protected static void startServer(String url, ReadOnlyProps props) throws Exception {
+//        Pass config through initDriver for testing purposes
+//        Don't create Config or surface getConfig or getProps in QueryServices
+//        Create Config in ConnectionQueryServices, but don't surface it
+//        Add getAdmin in ConnectionQueryServices
+        PhoenixTestDriver driver = initDriver(new QueryServicesTestImpl(props));
         assertTrue(DriverManager.getDriver(url) == driver);
         driver.connect(url, TEST_PROPERTIES);
     }
+    
+    protected static void startServer(String url) throws Exception {
+        startServer(url, ReadOnlyProps.EMPTY_PROPS);
+    }
 
     protected static void stopServer() throws Exception {
         destroyDriver();