Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Zookeeper >> mail # dev >> Re: Review Request: ZOOKEEPER-1346: Handle 4lws and monitoring on separate port (creating jetty server)


+
Edward Ribeiro 2013-01-16, 02:11
+
Edward Ribeiro 2013-01-16, 01:51
+
Skye Wanderman-Milne 2013-01-17, 00:45
Copy link to this message
-
Re: Review Request: ZOOKEEPER-1346: Handle 4lws and monitoring on separate port (creating jetty server)


> On Jan. 9, 2013, 7:13 p.m., Patrick Hunt wrote:
> > src/java/main/org/apache/zookeeper/server/ExpiryQueue.java, line 181
> > <https://reviews.apache.org/r/8094/diff/4/?file=244379#file244379line181>
> >
> >     is it necessary to break encapsulation like this? would be safer if we didn't.
> >    
> >     worst case we could wrap in http://docs.oracle.com/javase/6/docs/api/java/util/Collections.html#unmodifiableMap(java.util.Map) but even then the value would still be modifyable...

I'm going with the unmodifiableMap. The value is still modifiable, but this is unavoidable since the ExpiryQueue doesn't know anything about the values it's storing -- no matter how you slice it, SessionTrackerImpl needs access to the stored SessionImpl values so it can extract the IDs, at least without ExpiryMap getting super fancy. I think exposing the values is pretty reasonable, though, since ExpiryQueue doesn't depend on not modifying the stored values and the values are provided by outside callers to begin with. I agree it's ugly but I think this is the simplest and best solution.
- Skye
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8094/#review15204
-----------------------------------------------------------
On Jan. 4, 2013, 2:17 a.m., Skye Wanderman-Milne wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8094/
> -----------------------------------------------------------
>
> (Updated Jan. 4, 2013, 2:17 a.m.)
>
>
> Review request for zookeeper, Patrick Hunt, Camille Fournier, and Henry Robinson.
>
>
> Description
> -------
>
> See my comment in ZOOKEEPER-1346.
>
>
> This addresses bug ZOOKEEPER-1346.
>     https://issues.apache.org/jira/browse/ZOOKEEPER-1346
>
>
> Diffs
> -----
>
>   ivy.xml fadf4f4
>   src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml 47190a8
>   src/java/main/org/apache/zookeeper/server/DataTree.java d6c7773
>   src/java/main/org/apache/zookeeper/server/ExpiryQueue.java 130c58e
>   src/java/main/org/apache/zookeeper/server/NIOServerCnxnFactory.java 9422538
>   src/java/main/org/apache/zookeeper/server/NettyServerCnxnFactory.java eec2f2a
>   src/java/main/org/apache/zookeeper/server/ServerCnxn.java 35ea301
>   src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java 267dbdf
>   src/java/main/org/apache/zookeeper/server/ServerStats.java aa0d93f
>   src/java/main/org/apache/zookeeper/server/SessionTracker.java 3535e1b
>   src/java/main/org/apache/zookeeper/server/SessionTrackerImpl.java 137862e
>   src/java/main/org/apache/zookeeper/server/WatchManager.java 0e7c815
>   src/java/main/org/apache/zookeeper/server/ZKDatabase.java d6c0c05
>   src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java 14e754b
>   src/java/main/org/apache/zookeeper/server/ZooKeeperServerMain.java 369e621
>   src/java/main/org/apache/zookeeper/server/ZooTrace.java ac14fe2
>   src/java/main/org/apache/zookeeper/server/admin/AdminServer.java PRE-CREATION
>   src/java/main/org/apache/zookeeper/server/admin/AdminServerFactory.java PRE-CREATION
>   src/java/main/org/apache/zookeeper/server/admin/Command.java PRE-CREATION
>   src/java/main/org/apache/zookeeper/server/admin/CommandBase.java PRE-CREATION
>   src/java/main/org/apache/zookeeper/server/admin/CommandOutputter.java PRE-CREATION
>   src/java/main/org/apache/zookeeper/server/admin/Commands.java PRE-CREATION
>   src/java/main/org/apache/zookeeper/server/admin/DummyAdminServer.java PRE-CREATION
>   src/java/main/org/apache/zookeeper/server/admin/JettyAdminServer.java PRE-CREATION
>   src/java/main/org/apache/zookeeper/server/admin/JsonOutputter.java PRE-CREATION
>   src/java/main/org/apache/zookeeper/server/quorum/Leader.java 8a432ff
>   src/java/main/org/apache/zookeeper/server/quorum/Learner.java e8d548b
>   src/java/main/org/apache/zookeeper/server/quorum/LearnerSessionTracker.java 3182419
+
Skye Wanderman-Milne 2013-01-15, 23:57
+
Skye Wanderman-Milne 2013-01-15, 23:53
+
Edward Ribeiro 2013-01-16, 03:25
+
Edward Ribeiro 2013-01-16, 03:15
+
Edward Ribeiro 2013-01-16, 02:52
+
Edward Ribeiro 2013-01-16, 02:50
+
Skye Wanderman-Milne 2013-01-17, 01:17
+
Skye Wanderman-Milne 2013-01-17, 01:13
+
Edward Ribeiro 2013-01-16, 02:42
+
Skye Wanderman-Milne 2013-01-17, 02:01
+
Edward Ribeiro 2013-01-17, 16:17
+
Edward Ribeiro 2013-01-17, 23:53
+
Edward Ribeiro 2013-01-21, 17:37
+
Skye Wanderman-Milne 2013-01-17, 02:04