> On Aug. 19, 2013, 5:04 a.m., Rohini Palaniswamy wrote:
> > /trunk/core/src/main/java/org/apache/oozie/service/ZKXLogStreamingService.java,
> >  line 138
> > <https://reviews.apache.org/r/11922/diff/9/?file=340665#file340665line138>
> >
> >     Logic is good, but implementation needs rethinking as it is not 
> > efficient. Can be a separate jira. 
> >     
> >     Few things that I could think of
> >     
> >     1) If you are reading over http and at the same time 
> > processing/filtering on this server and holding up the connection, based on 
> > tomcat timeout the connection to other servers will mostly get dropped. 
> >     
> >     2) Processing is going to be very slow with the treemap implementation 
> > and the Oozie UI Ajax call could time out. 
> >     
> >
> 
> Robert Kanter wrote:
>     1) Is there some way to keep the connection alive longer?  Otherwise, the 
> only alternative I can think of is to bring all of the logs into memory like 
> I was doing before, but this has other issues (i.e. using too much memory).  
>     
>     2) The TreeMap should only have at most N items in it at any given time, 
> where N is the number of servers.  So I don't think this should be too slow; 
> in any case, we need to keep the N items sorted and this seemed like a good 
> way -- what would be a better way?

Haven't given much thought. One thing that comes to mind is to stream files in 
temporary directory first and then merge them instead of keeping it in memory. 

The connection timeout setting is a tomcat setting and cannot be changed in 
application. With or without timeouts (infinite timeout), making multiple IO 
calls to read line by line from server itself will introduce lot of slowness. 
If you address 1) by downloading in bulk and reading locally 2) might not be 
that much of a problem. 


> On Aug. 19, 2013, 5:04 a.m., Rohini Palaniswamy wrote:
> > /trunk/core/src/main/java/org/apache/oozie/util/ZKUtils.java, line 272
> > <https://reviews.apache.org/r/11922/diff/9/?file=340682#file340682line272>
> >
> >     Why not an enum?
> 
> Robert Kanter wrote:
>     Enums would become integers when put into the hashmap in the ZK metadata. 
>  So, "OOZIE_ID" would be equivalent to 0 and "OOZIE_URL" would be equivalent 
> to 1.  I think using Strings is better because if we ever want to add new 
> properties or remove existing properties, we won't run into issues were the 
> integers get remapped differently.  e.g. if we removed "OOZIE_ID", then 
> "OOZIE_URL" would become 0 and that wouldn't be backwards compatible with any 
> pre-existing metadata in ZK.

I meant doing enum.name(). But this is fine. You can make it an interface if 
you want. All the declarations will automatically be public static final.


> On Aug. 19, 2013, 5:04 a.m., Rohini Palaniswamy wrote:
> > /trunk/core/src/main/java/org/apache/oozie/service/ZKJobsConcurrencyService.java,
> >  line 58
> > <https://reviews.apache.org/r/11922/diff/9/?file=340663#file340663line58>
> >
> >     Registering with a utils class looks hacky. Do we need to register and 
> > unregister? You are only tearing it down on shutdown. So can't we call 
> > teardown directly from one of the services.
> 
> Robert Kanter wrote:
>     The 3 ZK-related services can be started in any order.  If we chose one 
> of them to handle connecting/disconnecting to/from ZK, then we'd have to make 
> sure somehow that it's started first and killed last because all 3 of the 
> services require ZK; I don't believe there is a mechanism for this.  Plus, it 
> will be more difficult for testing if we can't assume that Oozie is connected 
> to ZK when any of the 3 services is started.

I see. teardown is the problem. start should not be an issue as it is a 
singleton. I am ok with this.


- Rohini


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11922/#review23518
-----------------------------------------------------------


On Aug. 13, 2013, 5:35 p.m., Robert Kanter wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11922/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2013, 5:35 p.m.)
> 
> 
> Review request for oozie.
> 
> 
> Bugs: OOZIE-615
>     https://issues.apache.org/jira/browse/OOZIE-615
> 
> 
> Repository: oozie
> 
> 
> Description
> -------
> 
> See this comment for details:
> https://issues.apache.org/jira/browse/OOZIE-615?focusedCommentId=13686181&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13686181
> 
> 
> Diffs
> -----
> 
>   /trunk/client/src/main/java/org/apache/oozie/cli/OozieCLI.java 1513595 
>   /trunk/client/src/main/java/org/apache/oozie/client/OozieClient.java 
> 1513595 
>   /trunk/client/src/main/java/org/apache/oozie/client/rest/RestConstants.java 
> 1513595 
>   /trunk/core/pom.xml 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/BaseEngine.java 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/BundleEngine.java 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/CoordinatorEngine.java 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/DagEngine.java 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/ErrorCode.java 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/command/Command.java 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/command/XCommand.java 1513595 
>   
> /trunk/core/src/main/java/org/apache/oozie/service/ActionCheckerService.java 
> 1513595 
>   
> /trunk/core/src/main/java/org/apache/oozie/service/JobsConcurrencyService.java
>  PRE-CREATION 
>   /trunk/core/src/main/java/org/apache/oozie/service/MemoryLocksService.java 
> 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/service/PauseTransitService.java 
> 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/service/PurgeService.java 
> 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/service/RecoveryService.java 
> 1513595 
>   
> /trunk/core/src/main/java/org/apache/oozie/service/StatusTransitService.java 
> 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/service/XLogService.java 1513595 
>   
> /trunk/core/src/main/java/org/apache/oozie/service/XLogStreamingService.java 
> PRE-CREATION 
>   
> /trunk/core/src/main/java/org/apache/oozie/service/ZKJobsConcurrencyService.java
>  PRE-CREATION 
>   /trunk/core/src/main/java/org/apache/oozie/service/ZKLocksService.java 
> PRE-CREATION 
>   
> /trunk/core/src/main/java/org/apache/oozie/service/ZKXLogStreamingService.java
>  PRE-CREATION 
>   /trunk/core/src/main/java/org/apache/oozie/servlet/BaseAdminServlet.java 
> 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/servlet/ServicesLoader.java 
> 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/servlet/V0AdminServlet.java 
> 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/servlet/V0JobServlet.java 
> 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/servlet/V1AdminServlet.java 
> 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/servlet/V1JobServlet.java 
> 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/servlet/V2AdminServlet.java 
> 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/util/ConfigUtils.java 1513595 
>   
> /trunk/core/src/main/java/org/apache/oozie/util/FixedJsonInstanceSerializer.java
>  PRE-CREATION 
>   /trunk/core/src/main/java/org/apache/oozie/util/LockToken.java PRE-CREATION 
>   /trunk/core/src/main/java/org/apache/oozie/util/MemoryLocks.java 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/util/MultiFileReader.java 
> PRE-CREATION 
>   
> /trunk/core/src/main/java/org/apache/oozie/util/SimpleTimestampedMessageParser.java
>  PRE-CREATION 
>   
> /trunk/core/src/main/java/org/apache/oozie/util/TimestampedMessageParser.java 
> PRE-CREATION 
>   /trunk/core/src/main/java/org/apache/oozie/util/XLogReader.java 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/util/XLogStreamer.java 1513595 
>   /trunk/core/src/main/java/org/apache/oozie/util/ZKUtils.java PRE-CREATION 
>   /trunk/core/src/main/resources/oozie-default.xml 1513595 
>   
> /trunk/core/src/test/java/org/apache/oozie/TestCoordinatorEngineStreamLog.java
>  1513595 
>   /trunk/core/src/test/java/org/apache/oozie/command/TestXCommand.java 
> 1513595 
>   
> /trunk/core/src/test/java/org/apache/oozie/service/DummyLogStreamingServlet.java
>  PRE-CREATION 
>   
> /trunk/core/src/test/java/org/apache/oozie/service/TestJobsConcurrencyService.java
>  PRE-CREATION 
>   /trunk/core/src/test/java/org/apache/oozie/service/TestXLogService.java 
> 1513595 
>   
> /trunk/core/src/test/java/org/apache/oozie/service/TestXLogStreamingService.java
>  PRE-CREATION 
>   
> /trunk/core/src/test/java/org/apache/oozie/service/TestZKJobsConcurrencyService.java
>  PRE-CREATION 
>   /trunk/core/src/test/java/org/apache/oozie/service/TestZKLocksService.java 
> PRE-CREATION 
>   
> /trunk/core/src/test/java/org/apache/oozie/service/TestZKXLogStreamingService.java
>  PRE-CREATION 
>   
> /trunk/core/src/test/java/org/apache/oozie/servlet/MockCoordinatorEngineService.java
>  1513595 
>   
> /trunk/core/src/test/java/org/apache/oozie/servlet/MockDagEngineService.java 
> 1513595 
>   /trunk/core/src/test/java/org/apache/oozie/test/ZKXTestCase.java 
> PRE-CREATION 
>   /trunk/core/src/test/java/org/apache/oozie/util/TestLogStreamer.java 
> 1513595 
>   /trunk/core/src/test/java/org/apache/oozie/util/TestMemoryLocks.java 
> 1513595 
>   /trunk/core/src/test/java/org/apache/oozie/util/TestMultiFileReader.java 
> PRE-CREATION 
>   
> /trunk/core/src/test/java/org/apache/oozie/util/TestSimplifiedTimestampedMessageParser.java
>  PRE-CREATION 
>   
> /trunk/core/src/test/java/org/apache/oozie/util/TestTimestampedMessageParser.java
>  PRE-CREATION 
>   /trunk/core/src/test/java/org/apache/oozie/util/TestXLogFilter.java 1513595 
>   /trunk/core/src/test/java/org/apache/oozie/util/TestXLogReader.java 1513595 
>   /trunk/core/src/test/java/org/apache/oozie/util/TestZKUtils.java 
> PRE-CREATION 
>   /trunk/distro/src/main/tomcat/ssl-web.xml 1513595 
>   /trunk/docs/src/site/twiki/AG_Install.twiki 1513595 
>   /trunk/docs/src/site/twiki/DG_CommandLineTool.twiki 1513595 
>   /trunk/docs/src/site/twiki/WebServicesAPI.twiki 1513595 
>   /trunk/pom.xml 1513595 
> 
> Diff: https://reviews.apache.org/r/11922/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Robert Kanter
> 
>

Reply via email to