[jira] [Commented] (DRILL-4491) FormatPluginOptionsDescriptor requires FormatPluginConfig fields to be public

2016-11-01 Thread Parth Chandra (JIRA)

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

Parth Chandra commented on DRILL-4491:
--

[~adityakishore] Do you see any case where we have a format plugin with private 
fields that need to be accessed? If not, then is the setAccessible call simply 
redundant?
Agree with Jason and you that using Jackson serializable annotations would have 
been the right way to go.

> FormatPluginOptionsDescriptor requires FormatPluginConfig fields to be public
> -
>
> Key: DRILL-4491
> URL: https://issues.apache.org/jira/browse/DRILL-4491
> Project: Apache Drill
>  Issue Type: Bug
>Reporter: Aditya Kishore
>Assignee: Parth Chandra
>Priority: Minor
> Fix For: Future
>
>
> The code uses {{getField()}} instead of {{getDeclaredField()}}, which returns 
> only the public fields.
> {code:title=FormatPluginOptionsDescriptor.java:165|borderStyle=solid}
> Field field = pluginConfigClass.getField(paramDef.name);
> {code}



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


[jira] [Commented] (DRILL-4491) FormatPluginOptionsDescriptor requires FormatPluginConfig fields to be public

2016-03-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on DRILL-4491:
---

Github user adityakishore commented on the pull request:

https://github.com/apache/drill/pull/418#issuecomment-194097775
  
Until I looked at the code, I was under assumption that we are using 
Jackson to extract the serializable properties. We can, and should, definitely 
go that route.

The way code currently works is that it iterate through allthe table 
options and see if there is a Java field present in the corresponding 
FormatPluginConfig class. If it does find one, and this is why I say it is a 
bug in the current implementation, it makes is accessible 
(`setAccesible(true)`) implying that it is expected to work with non-public 
fields and sets the value to the one passed as parameter.


> FormatPluginOptionsDescriptor requires FormatPluginConfig fields to be public
> -
>
> Key: DRILL-4491
> URL: https://issues.apache.org/jira/browse/DRILL-4491
> Project: Apache Drill
>  Issue Type: Bug
>Reporter: Aditya Kishore
>Assignee: Aditya Kishore
>Priority: Minor
> Fix For: 1.7.0
>
>
> The code uses {{getField()}} instead of {{getDeclaredField()}}, which returns 
> only the public fields.
> {code:title=FormatPluginOptionsDescriptor.java:165|borderStyle=solid}
> Field field = pluginConfigClass.getField(paramDef.name);
> {code}



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


[jira] [Commented] (DRILL-4491) FormatPluginOptionsDescriptor requires FormatPluginConfig fields to be public

2016-03-08 Thread Aditya Kishore (JIRA)

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

Aditya Kishore commented on DRILL-4491:
---

Until I looked at the code, I was under assumption that we are using Jackson to 
extract the serializable properties. We can definitely go that route.

The way code currently work is that it iterate 

> FormatPluginOptionsDescriptor requires FormatPluginConfig fields to be public
> -
>
> Key: DRILL-4491
> URL: https://issues.apache.org/jira/browse/DRILL-4491
> Project: Apache Drill
>  Issue Type: Bug
>Reporter: Aditya Kishore
>Assignee: Aditya Kishore
>Priority: Minor
> Fix For: 1.7.0
>
>
> The code uses {{getField()}} instead of {{getDeclaredField()}}, which returns 
> only the public fields.
> {code:title=FormatPluginOptionsDescriptor.java:165|borderStyle=solid}
> Field field = pluginConfigClass.getField(paramDef.name);
> {code}



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


[jira] [Commented] (DRILL-4491) FormatPluginOptionsDescriptor requires FormatPluginConfig fields to be public

2016-03-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on DRILL-4491:
---

Github user jaltekruse commented on the pull request:

https://github.com/apache/drill/pull/418#issuecomment-194049783
  
Is there a way to ask Jackson to look at a POJO and give you what it 
considers to be the serializable fields? This isn't quite the right fix because 
it is valid to have private members in a class and only have some of the 
serialized and deserialized by Jackson based on gettters/setters. This would 
expose the non-serializable fields as options.


> FormatPluginOptionsDescriptor requires FormatPluginConfig fields to be public
> -
>
> Key: DRILL-4491
> URL: https://issues.apache.org/jira/browse/DRILL-4491
> Project: Apache Drill
>  Issue Type: Bug
>Reporter: Aditya Kishore
>Assignee: Aditya Kishore
>Priority: Minor
> Fix For: 1.7.0
>
>
> The code uses {{getField()}} instead of {{getDeclaredField()}}, which returns 
> only the public fields.
> {code:title=FormatPluginOptionsDescriptor.java:165|borderStyle=solid}
> Field field = pluginConfigClass.getField(paramDef.name);
> {code}



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


[jira] [Commented] (DRILL-4491) FormatPluginOptionsDescriptor requires FormatPluginConfig fields to be public

2016-03-08 Thread Aditya Kishore (JIRA)

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

Aditya Kishore commented on DRILL-4491:
---

Not critical for 1.6.

> FormatPluginOptionsDescriptor requires FormatPluginConfig fields to be public
> -
>
> Key: DRILL-4491
> URL: https://issues.apache.org/jira/browse/DRILL-4491
> Project: Apache Drill
>  Issue Type: Bug
>Reporter: Aditya Kishore
>Assignee: Aditya Kishore
>Priority: Minor
> Fix For: 1.7.0
>
>
> The code uses {{getField()}} instead of {{getDeclaredField()}}, which returns 
> only the public fields.
> {code:title=FormatPluginOptionsDescriptor.java:165|borderStyle=solid}
> Field field = pluginConfigClass.getField(paramDef.name);
> {code}



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


[jira] [Commented] (DRILL-4491) FormatPluginOptionsDescriptor requires FormatPluginConfig fields to be public

2016-03-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on DRILL-4491:
---

GitHub user adityakishore opened a pull request:

https://github.com/apache/drill/pull/418

DRILL-4491: FormatPluginOptionsDescriptor requires FormatPluginConfig…

… fields to be public

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/adityakishore/drill DRILL-4491

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/drill/pull/418.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #418


commit cce8467c2476da871891bad7db6cab3236537f7c
Author: Aditya Kishore 
Date:   2016-03-09T00:49:55Z

DRILL-4491: FormatPluginOptionsDescriptor requires FormatPluginConfig 
fields to be public




> FormatPluginOptionsDescriptor requires FormatPluginConfig fields to be public
> -
>
> Key: DRILL-4491
> URL: https://issues.apache.org/jira/browse/DRILL-4491
> Project: Apache Drill
>  Issue Type: Bug
>Reporter: Aditya Kishore
>Assignee: Aditya Kishore
>Priority: Minor
> Fix For: 1.7.0
>
>
> The code uses {{getField()}} instead of {{getDeclaredField()}}, which returns 
> only the public fields.
> {code:title=FormatPluginOptionsDescriptor.java:165|borderStyle=solid}
> Field field = pluginConfigClass.getField(paramDef.name);
> {code}



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