> On 2012-03-02 19:06:59, Alejandro Abdelnur wrote: > > http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/command/XCommand.java, > > line 235 > > <https://reviews.apache.org/r/4035/diff/4/?file=86276#file86276line235> > > > > Wouldn't be simpler to use an AtomicBoolean for used? > > > > if (used.compare(true, true)) { > > .... > > }
you mean compareAndSet .... [yes it should work] > On 2012-03-02 19:06:59, Alejandro Abdelnur wrote: > > http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/command/XCommand.java, > > line 237 > > <https://reviews.apache.org/r/4035/diff/4/?file=86276#file86276line237> > > > > shouldn't be > > > > if (this.getInterrupMode()) { > > ... > > } will use it instead > On 2012-03-02 19:06:59, Alejandro Abdelnur wrote: > > http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/command/XCommand.java, > > line 259 > > <https://reviews.apache.org/r/4035/diff/4/?file=86276#file86276line259> > > > > also, the getInterruptMode() method should be isInterruptMode() will change it - Mohamed ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4035/#review5572 ----------------------------------------------------------- On 2012-02-28 18:25:19, Mohamed Battisha wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/4035/ > ----------------------------------------------------------- > > (Updated 2012-02-28 18:25:19) > > > Review request for oozie. > > > Summary > ------- > > While executing an interrupt driven commands it may be executed from the map > on one thread and executed from the queue at a different thread > This will cause the following exception to be thrown: > java.lang.IllegalStateException: CoordChangeXCommand already used. > > - Avoiding throwing exception in case of interrupts and synchronizing the > changes in [used] > - Avoiding executing interrupt in case of commands that doesn't need locks > - Changing the debug message for execute interrupt to explicitly mentioning > it is an interrupt command > > > This addresses bug OOZIE-684. > https://issues.apache.org/jira/browse/OOZIE-684 > > > Diffs > ----- > > > http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/command/XCommand.java > 1293381 > > Diff: https://reviews.apache.org/r/4035/diff > > > Testing > ------- > > > Thanks, > > Mohamed > >
