[ 
https://issues.apache.org/jira/browse/PHOENIX-2429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15011477#comment-15011477
 ] 

James Taylor commented on PHOENIX-2429:
---------------------------------------

The PropertiesUtil.extractProperties(props, conf) method called from 
ConnectionUtil.getInputConnection() copies over all config properties to props, 
so it seems to me that this extra code isn't needed at all *if* 
CURRENT_SCN_ATTRIB is set in configuration:
{code}
            final String currentScnValue = 
configuration.get(PhoenixConfigurationUtil.CURRENT_SCN_VALUE);
            final Properties overridingProps = new Properties();
            if(currentScnValue != null) {
                overridingProps.put(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
currentScnValue);
            }
            final Connection connection = 
ConnectionUtil.getInputConnection(configuration, overridingProps);
{code}
How is the CURRENT_SCN_ATTRIB passed in? I think it may get lost if it comes in 
on the URL. If that's the case, then could it be set on the Configuration 
before ConnectionUtil.getInputConnection() is called so that it's copied over 
with the rest of the Configuration properties (and then remove the above 
unnecessary code if that's the case)?

> PhoenixConfigurationUtil.CURRENT_SCN_VALUE for phoenix-spark plugin does not 
> work
> ---------------------------------------------------------------------------------
>
>                 Key: PHOENIX-2429
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2429
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.2.0, 4.6.0
>            Reporter: Diego Fustes Villadóniga
>
> When I call the method saveToPhoenix to store the contents of a ProductDD, 
> passing a hadoop configuration, where I set 
> PhoenixConfigurationUtil.CURRENT_SCN_VALUE to be a given timestamp, the 
> values are not stored with such timestamp, but using the server time



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to