[jira] [Resolved] (ACCUMULO-4682) Standardize and enforce import order

2017-07-25 Thread Christopher Tubbs (JIRA)

 [ 
https://issues.apache.org/jira/browse/ACCUMULO-4682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christopher Tubbs resolved ACCUMULO-4682.
-
Resolution: Fixed

> Standardize and enforce import order
> 
>
> Key: ACCUMULO-4682
> URL: https://issues.apache.org/jira/browse/ACCUMULO-4682
> Project: Accumulo
>  Issue Type: Task
>  Components: build
>Reporter: Christopher Tubbs
>Assignee: Christopher Tubbs
> Fix For: 1.7.4, 1.8.2, 2.0.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> I created a plugin to automatically format Java source files with import 
> order rules.
> I ran and tested it on Accumulo and it worked well, aside from a few 
> malformed files.
> http://code.revelc.net/impsort-maven-plugin/sort-mojo.html
> https://github.com/revelc/impsort-maven-plugin
> (NOTE: each group is sorted within its section)
> I tested using Eclipse default import order rules, which are:
> {code}
> static *
> java.*
> javax.*
> org.*
> com.*
> * - everything else
> {code}
> These are a bit unnecessary, I think. A saner and more useful ordering might 
> be:
> {code}
> static *
> org.apache.accumulo.*
> java.*
> javax.*
> * - everything else
> {code}
> Alternatively, I do like the simplicity of:
> {code}
> static *
> (with or without blank line?)
> * - everything else
> {code}
> The plugin can handle any of these, so we just need to pick what we like.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (ACCUMULO-4687) Address some static analysis feedback from Fortify

2017-07-25 Thread Josh Elser (JIRA)
Josh Elser created ACCUMULO-4687:


 Summary: Address some static analysis feedback from Fortify
 Key: ACCUMULO-4687
 URL: https://issues.apache.org/jira/browse/ACCUMULO-4687
 Project: Accumulo
  Issue Type: Improvement
Reporter: Josh Elser
Assignee: Josh Elser
Priority: Minor
 Fix For: 1.7.4, 1.8.2, 2.0.0


Fortify flagged some things in Accumulo (mostly against 1.7 and 1.8). Actually, 
it flagged a lot of things, but there were a few that I noticed which are minor 
but wouldn't hurt for us to fix.

* The {{JarFile}} in {{Jar.java}} is never closed
* {{BoundedRangeFileInputStream}} invokes a PrivilegedAction for some reason I 
can't fathom (been this way since code import -- I think it can be removed).
* Numeric validate on the refresh cookie in the monitor
* Use {{HttpOnly}} on the cookies we create to mark that we only expect them to 
be accessed by the browser
* We put the request URI back into the page body in DefautlServlet if we can't 
load the requested element (putting user-controlled info in a http response -- 
generally bad news). We can just trim the data we write to the browser and log 
it instead.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (ACCUMULO-4682) Standardize and enforce import order

2017-07-25 Thread Christopher Tubbs (JIRA)

[ 
https://issues.apache.org/jira/browse/ACCUMULO-4682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100761#comment-16100761
 ] 

Christopher Tubbs commented on ACCUMULO-4682:
-

Given the lack of comments, I'm going to go with the minimal change, which is 
to apply the Eclipse default rules.

> Standardize and enforce import order
> 
>
> Key: ACCUMULO-4682
> URL: https://issues.apache.org/jira/browse/ACCUMULO-4682
> Project: Accumulo
>  Issue Type: Task
>  Components: build
>Reporter: Christopher Tubbs
>Assignee: Christopher Tubbs
> Fix For: 1.7.4, 1.8.2, 2.0.0
>
>
> I created a plugin to automatically format Java source files with import 
> order rules.
> I ran and tested it on Accumulo and it worked well, aside from a few 
> malformed files.
> http://code.revelc.net/impsort-maven-plugin/sort-mojo.html
> https://github.com/revelc/impsort-maven-plugin
> (NOTE: each group is sorted within its section)
> I tested using Eclipse default import order rules, which are:
> {code}
> static *
> java.*
> javax.*
> org.*
> com.*
> * - everything else
> {code}
> These are a bit unnecessary, I think. A saner and more useful ordering might 
> be:
> {code}
> static *
> org.apache.accumulo.*
> java.*
> javax.*
> * - everything else
> {code}
> Alternatively, I do like the simplicity of:
> {code}
> static *
> (with or without blank line?)
> * - everything else
> {code}
> The plugin can handle any of these, so we just need to pick what we like.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (ACCUMULO-4686) 1.8 upgrade path does not update version on multiple volumes

2017-07-25 Thread Ivan Bella (JIRA)

[ 
https://issues.apache.org/jira/browse/ACCUMULO-4686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100385#comment-16100385
 ] 

Ivan Bella commented on ACCUMULO-4686:
--

Ah, figured it out.  The routine is not using the fs specific version of 
getAccumuloPersistentVersion to determine the version on the volume of interest.

> 1.8 upgrade path does not update version on multiple volumes
> 
>
> Key: ACCUMULO-4686
> URL: https://issues.apache.org/jira/browse/ACCUMULO-4686
> Project: Accumulo
>  Issue Type: Bug
>  Components: master
>Affects Versions: 1.8.1
>Reporter: Ivan Bella
>Assignee: Ivan Bella
> Fix For: 1.8.2, 2.0.0
>
>
> The upgrade path from 1.6+ to 1.8 does not update the version across all 
> volumes in a multi-hdfs-volume cluster.  Only one of them gets updated and 
> subsequently all of the tservers will complain and ultimately fail.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (ACCUMULO-4686) 1.8 upgrade path does not update version on multiple volumes

2017-07-25 Thread Ivan Bella (JIRA)

[ 
https://issues.apache.org/jira/browse/ACCUMULO-4686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100377#comment-16100377
 ] 

Ivan Bella commented on ACCUMULO-4686:
--

The code suggests that this is done correctly (Accumulo.upgradeAccumuloVersion) 
however we definitely had an instance where this failed.  Doing more 
investigation as to why.

> 1.8 upgrade path does not update version on multiple volumes
> 
>
> Key: ACCUMULO-4686
> URL: https://issues.apache.org/jira/browse/ACCUMULO-4686
> Project: Accumulo
>  Issue Type: Bug
>  Components: master
>Affects Versions: 1.8.1
>Reporter: Ivan Bella
>Assignee: Ivan Bella
> Fix For: 1.8.2, 2.0.0
>
>
> The upgrade path from 1.6+ to 1.8 does not update the version across all 
> volumes in a multi-hdfs-volume cluster.  Only one of them gets updated and 
> subsequently all of the tservers will complain and ultimately fail.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (ACCUMULO-4686) 1.8 upgrade path does not update version on multiple volumes

2017-07-25 Thread Ivan Bella (JIRA)
Ivan Bella created ACCUMULO-4686:


 Summary: 1.8 upgrade path does not update version on multiple 
volumes
 Key: ACCUMULO-4686
 URL: https://issues.apache.org/jira/browse/ACCUMULO-4686
 Project: Accumulo
  Issue Type: Bug
  Components: master
Affects Versions: 1.8.1
Reporter: Ivan Bella
Assignee: Ivan Bella
 Fix For: 1.8.2, 2.0.0


The upgrade path from 1.6+ to 1.8 does not update the version across all 
volumes in a multi-hdfs-volume cluster.  Only one of them gets updated and 
subsequently all of the tservers will complain and ultimately fail.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)