[ https://issues.apache.org/jira/browse/PHOENIX-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13930079#comment-13930079 ]
ASF GitHub Bot commented on PHOENIX-831: ---------------------------------------- Github user yaise commented on a diff in the pull request: https://github.com/apache/incubator-phoenix/pull/15#discussion_r10464447 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java --- @@ -119,7 +116,36 @@ private static Properties newPropsWithSCN(long scn, Properties props) { props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(scn)); return props; } - --- End diff -- I had thought of a subclass of properties where I would just change the copy constructor behavior and use this where appropriate . I can try that or a util. It's more generic than this solution . Although this solution nicely encapsulates tenant related changes to phoenixConnection where it's really used. In case we add more tenant related info that needs to stripped out ( or added ) in the future, this is the only point of change Somesh Sasalatti [sent from my mobile device] > On Mar 11, 2014, at 0:32, James Taylor <notificati...@github.com> wrote: > > In phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java: > > > @@ -119,7 +116,36 @@ private static Properties newPropsWithSCN(long scn, Properties props) { > > props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(scn)); > > return props; > > } > > - > Nice find. I'd rather keep things simple, though. I'm not worried about creating a new Properties here. How about a util method that just instantiating a new, empty constructor Properties and iterating through the entrySet of the one passed through to just add the values? I'd rather do that then special case tenantId. > > — > Reply to this email directly or view it on GitHub. > First Connection to Phoenix blows up if it is tenant specific > ------------------------------------------------------------- > > Key: PHOENIX-831 > URL: https://issues.apache.org/jira/browse/PHOENIX-831 > Project: Phoenix > Issue Type: Bug > Affects Versions: 3.0.0 > Reporter: Somesh Sasalatti > > Driver driver = DriverManager.getDriver(url); > Properties props = new Properties(); > final String tenantId = "00Dxx0000001234"; > props.put(PhoenixRuntime.TENANT_ID_ATTRIB, tenantId); > Connection connection = driver.connect(url, props); > BOOM! > I have pull request coming shortly -- This message was sent by Atlassian JIRA (v6.2#6252)