[GitHub] nifi issue #513: PutHBaseJSON processor treats all values as Strings

2016-06-20 Thread bbende
Github user bbende commented on the issue:

https://github.com/apache/nifi/pull/513
  
@rtempleton just merged this work as part of PR 542, thanks for the 
contribution! 

can we close this PR?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #513: PutHBaseJSON processor treats all values as Strings

2016-06-17 Thread bbende
Github user bbende commented on the issue:

https://github.com/apache/nifi/pull/513
  
@rtempleton please take a look at https://github.com/apache/nifi/pull/542

I've incorporated your work there with some additional changes which I 
explained in the PR description. Let me know if this seems good to you, and 
hopefully we should be able to get this into 0.7.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #513: PutHBaseJSON processor treats all values as Strings

2016-06-17 Thread bbende
Github user bbende commented on the issue:

https://github.com/apache/nifi/pull/513
  
Reviewing and going to merge into 0.x and master if all looks good...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #513: PutHBaseJSON processor treats all values as Strings

2016-06-09 Thread rtempleton
Github user rtempleton commented on the issue:

https://github.com/apache/nifi/pull/513
  
I like that idea.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #513: PutHBaseJSON processor treats all values as Strings

2016-06-09 Thread bbende
Github user bbende commented on the issue:

https://github.com/apache/nifi/pull/513
  
Thats a great point about leveraging any changes they make to the Bytes 
class... I'm now thinking, what if we added simple methods to the 
HBaseClientService interface [1] that wrapped the calls to Bytes?

Something like:

`byte[] toBytes(boolean b)
 byte[] toBytes(long l)
 byte[] toBytes(double d)
 byte[] toBytes(String s)
`
Then HBase_1_1_2_ClientService would implement those methods and use the 
Bytes class from 1.1.2, and if someone implemented a 0.94 version it would be 
up to them to use the Bytes class from 0.94 or whatever they wanted to do. The 
processors never know they are dealing with the Bytes class.

[1] 
https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-services/nifi-hbase-client-service-api/src/main/java/org/apache/nifi/hbase/HBaseClientService.java


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #513: PutHBaseJSON processor treats all values as Strings

2016-06-09 Thread rtempleton
Github user rtempleton commented on the issue:

https://github.com/apache/nifi/pull/513
  
Yes, You're exactly right. I looked at the code in the Bytes util class and 
thought about doing that but then just imported the dependency. I expect that 
HBase users will use this Bytes class to decode the value when they interact 
with the data through their client application. If there's a change to the 
encoding/decoding scheme implemented in the Bytes class, our implementation 
would need to be updated to reflect this change. That was my only concern for 
including the logic rather than just leveraging the Bytes util.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #513: PutHBaseJSON processor treats all values as Strings

2016-06-09 Thread bbende
Github user bbende commented on the issue:

https://github.com/apache/nifi/pull/513
  
Ryan, thanks for submitting this PR! 

Is it possible that we could remove the dependency on hbase-client here?

The reason being is that the hbase processor bundle purposely didn't 
include the hbase-client and instead used the hbase-client-service (which is 
where the hbase-client depndency is). This means that someone could implement 
an hbase-client-service for another version of hbase, such as 0.94 and the 
processors don't have to change at all. I think adding this dependency here 
would make that not possible because a specific version of hbase-client would 
now be bundled with the processors.

Seems like the reason for the dependency was to use the Bytes class that 
provides the conversion, which makes total sense. I'm wondering if we could 
look at what the code is doing and possibly write our own util, or if there is 
some other utility library to do this maybe we can use that.

Thoughts?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---