[jira] [Issue Comment Deleted] (CURATOR-546) currentData in ModeledCacheImpl removes ZPath from cache entries

2019-10-10 Thread Jordan Zimmerman (Jira)


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

Jordan Zimmerman updated CURATOR-546:
-
Comment: was deleted

(was: https://github.com/apache/curator/pull/329
)

> currentData in ModeledCacheImpl removes ZPath from cache entries 
> -
>
> Key: CURATOR-546
> URL: https://issues.apache.org/jira/browse/CURATOR-546
> Project: Apache Curator
>  Issue Type: Bug
>  Components: Client, Framework
>Affects Versions: 4.2.0
>Reporter: Yang
>Priority: Blocker
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> I'm using AsyncCuratorFramework with cache, during testing I noticed that 
> *client.cache().currentChildren()* not also return the full list of 
> children, by digging into *ModeledCacheImpl*, apparently some children been 
> deleted when I call *client.cache().currentData()*. 
> What's the alternative for me if I wants to get cached node while don't 
> remove it from the cache? 
>  
> public Optional> currentData(ZPath path)
>  {
>  Entry entry = entries.remove(path);
>  if ( entry != null )
> { return Optional.of(new ZNodeImpl<>(path, entry.stat, entry.model)); }
> return Optional.empty();
>  }
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CURATOR-546) currentData in ModeledCacheImpl removes ZPath from cache entries

2019-10-10 Thread Jordan Zimmerman (Jira)


[ 
https://issues.apache.org/jira/browse/CURATOR-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949145#comment-16949145
 ] 

Jordan Zimmerman commented on CURATOR-546:
--

https://github.com/apache/curator/pull/329


> currentData in ModeledCacheImpl removes ZPath from cache entries 
> -
>
> Key: CURATOR-546
> URL: https://issues.apache.org/jira/browse/CURATOR-546
> Project: Apache Curator
>  Issue Type: Bug
>  Components: Client, Framework
>Affects Versions: 4.2.0
>Reporter: Yang
>Priority: Blocker
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> I'm using AsyncCuratorFramework with cache, during testing I noticed that 
> *client.cache().currentChildren()* not also return the full list of 
> children, by digging into *ModeledCacheImpl*, apparently some children been 
> deleted when I call *client.cache().currentData()*. 
> What's the alternative for me if I wants to get cached node while don't 
> remove it from the cache? 
>  
> public Optional> currentData(ZPath path)
>  {
>  Entry entry = entries.remove(path);
>  if ( entry != null )
> { return Optional.of(new ZNodeImpl<>(path, entry.stat, entry.model)); }
> return Optional.empty();
>  }
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-546) currentData in ModeledCacheImpl removes ZPath from cache entries

2019-10-10 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-546?focusedWorklogId=326708=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-326708
 ]

ASF GitHub Bot logged work on CURATOR-546:
--

Author: ASF GitHub Bot
Created on: 11/Oct/19 05:27
Start Date: 11/Oct/19 05:27
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #329: [CURATOR-546] 
- ModeledCacheImpl.currentData() was removing from entries instead of calling 
get()
URL: https://github.com/apache/curator/pull/329
 
 
   Bad copy/paste bug. ModeledCacheImpl.currentData() was removing from entries 
instead of calling get()
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 326708)
Remaining Estimate: 0h
Time Spent: 10m

> currentData in ModeledCacheImpl removes ZPath from cache entries 
> -
>
> Key: CURATOR-546
> URL: https://issues.apache.org/jira/browse/CURATOR-546
> Project: Apache Curator
>  Issue Type: Bug
>  Components: Client, Framework
>Affects Versions: 4.2.0
>Reporter: Yang
>Priority: Blocker
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> I'm using AsyncCuratorFramework with cache, during testing I noticed that 
> *client.cache().currentChildren()* not also return the full list of 
> children, by digging into *ModeledCacheImpl*, apparently some children been 
> deleted when I call *client.cache().currentData()*. 
> What's the alternative for me if I wants to get cached node while don't 
> remove it from the cache? 
>  
> public Optional> currentData(ZPath path)
>  {
>  Entry entry = entries.remove(path);
>  if ( entry != null )
> { return Optional.of(new ZNodeImpl<>(path, entry.stat, entry.model)); }
> return Optional.empty();
>  }
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [curator] Randgalt opened a new pull request #329: [CURATOR-546] - ModeledCacheImpl.currentData() was removing from entries instead of calling get()

2019-10-10 Thread GitBox
Randgalt opened a new pull request #329: [CURATOR-546] - 
ModeledCacheImpl.currentData() was removing from entries instead of calling 
get()
URL: https://github.com/apache/curator/pull/329
 
 
   Bad copy/paste bug. ModeledCacheImpl.currentData() was removing from entries 
instead of calling get()


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (CURATOR-547) Make JAX-RS MessageBodyReader/-Writer impl (JsonServiceInstanceMarshaller) reuse Jackson ObjectMapper

2019-10-10 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-547?focusedWorklogId=326706=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-326706
 ]

ASF GitHub Bot logged work on CURATOR-547:
--

Author: ASF GitHub Bot
Created on: 11/Oct/19 05:25
Start Date: 11/Oct/19 05:25
Worklog Time Spent: 10m 
  Work Description: cowtowncoder commented on pull request #328: 
CURATOR-547 change JAX-RS reader/writer to reuse Jackson ObjectMapper
URL: https://github.com/apache/curator/pull/328
 
 
   also upgrade Jackson version from 2.9.8 to 2.9.10 (latest 2.9.x patch).
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 326706)
Remaining Estimate: 0h
Time Spent: 10m

> Make JAX-RS MessageBodyReader/-Writer impl (JsonServiceInstanceMarshaller) 
> reuse Jackson ObjectMapper
> -
>
> Key: CURATOR-547
> URL: https://issues.apache.org/jira/browse/CURATOR-547
> Project: Apache Curator
>  Issue Type: Improvement
>Reporter: Tatu Saloranta
>Assignee: Jordan Zimmerman
>Priority: Minor
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> I noticed that the JAX-RS reader/writer implementation, 
> `JsonServiceInstanceMarshaller` creates `ObjectMapper`s on-the-fly for every 
> read and write. This is pretty inefficient, and it is easy to create and use 
> a static mapper instance instead.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [curator] cowtowncoder opened a new pull request #328: CURATOR-547 change JAX-RS reader/writer to reuse Jackson ObjectMapper

2019-10-10 Thread GitBox
cowtowncoder opened a new pull request #328: CURATOR-547 change JAX-RS 
reader/writer to reuse Jackson ObjectMapper
URL: https://github.com/apache/curator/pull/328
 
 
   also upgrade Jackson version from 2.9.8 to 2.9.10 (latest 2.9.x patch).
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Created] (CURATOR-547) Make JAX-RS MessageBodyReader/-Writer impl (JsonServiceInstanceMarshaller) reuse Jackson ObjectMapper

2019-10-10 Thread Tatu Saloranta (Jira)
Tatu Saloranta created CURATOR-547:
--

 Summary: Make JAX-RS MessageBodyReader/-Writer impl 
(JsonServiceInstanceMarshaller) reuse Jackson ObjectMapper
 Key: CURATOR-547
 URL: https://issues.apache.org/jira/browse/CURATOR-547
 Project: Apache Curator
  Issue Type: Improvement
Reporter: Tatu Saloranta
Assignee: Jordan Zimmerman


I noticed that the JAX-RS reader/writer implementation, 
`JsonServiceInstanceMarshaller` creates `ObjectMapper`s on-the-fly for every 
read and write. This is pretty inefficient, and it is easy to create and use a 
static mapper instance instead.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CURATOR-546) currentData in ModeledCacheImpl removes ZPath from cache entries

2019-10-10 Thread Yang (Jira)


[ 
https://issues.apache.org/jira/browse/CURATOR-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16948905#comment-16948905
 ] 

Yang commented on CURATOR-546:
--

The workaround I have for now is use *currentChildren(ZPath.root).get(zpath)* 
instead. however, I noticed some performance problem for this function with 
large number of znode.

> currentData in ModeledCacheImpl removes ZPath from cache entries 
> -
>
> Key: CURATOR-546
> URL: https://issues.apache.org/jira/browse/CURATOR-546
> Project: Apache Curator
>  Issue Type: Bug
>  Components: Client, Framework
>Affects Versions: 4.2.0
>Reporter: Yang
>Priority: Blocker
>
> I'm using AsyncCuratorFramework with cache, during testing I noticed that 
> *client.cache().currentChildren()* not also return the full list of 
> children, by digging into *ModeledCacheImpl*, apparently some children been 
> deleted when I call *client.cache().currentData()*. 
> What's the alternative for me if I wants to get cached node while don't 
> remove it from the cache? 
>  
> public Optional> currentData(ZPath path)
>  {
>  Entry entry = entries.remove(path);
>  if ( entry != null )
> { return Optional.of(new ZNodeImpl<>(path, entry.stat, entry.model)); }
> return Optional.empty();
>  }
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CURATOR-546) currentData in ModeledCacheImpl removes ZPath from cache entries

2019-10-10 Thread Yang (Jira)


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

Yang updated CURATOR-546:
-
Attachment: kafka-consumer-proxy-cpu-profile.svg

> currentData in ModeledCacheImpl removes ZPath from cache entries 
> -
>
> Key: CURATOR-546
> URL: https://issues.apache.org/jira/browse/CURATOR-546
> Project: Apache Curator
>  Issue Type: Bug
>  Components: Client, Framework
>Affects Versions: 4.2.0
>Reporter: Yang
>Priority: Blocker
>
> I'm using AsyncCuratorFramework with cache, during testing I noticed that 
> *client.cache().currentChildren()* not also return the full list of 
> children, by digging into *ModeledCacheImpl*, apparently some children been 
> deleted when I call *client.cache().currentData()*. 
> What's the alternative for me if I wants to get cached node while don't 
> remove it from the cache? 
>  
> public Optional> currentData(ZPath path)
>  {
>  Entry entry = entries.remove(path);
>  if ( entry != null )
> { return Optional.of(new ZNodeImpl<>(path, entry.stat, entry.model)); }
> return Optional.empty();
>  }
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CURATOR-546) currentData in ModeledCacheImpl removes ZPath from cache entries

2019-10-10 Thread Yang (Jira)


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

Yang updated CURATOR-546:
-
Attachment: (was: kafka-consumer-proxy-cpu-profile.svg)

> currentData in ModeledCacheImpl removes ZPath from cache entries 
> -
>
> Key: CURATOR-546
> URL: https://issues.apache.org/jira/browse/CURATOR-546
> Project: Apache Curator
>  Issue Type: Bug
>  Components: Client, Framework
>Affects Versions: 4.2.0
>Reporter: Yang
>Priority: Blocker
>
> I'm using AsyncCuratorFramework with cache, during testing I noticed that 
> *client.cache().currentChildren()* not also return the full list of 
> children, by digging into *ModeledCacheImpl*, apparently some children been 
> deleted when I call *client.cache().currentData()*. 
> What's the alternative for me if I wants to get cached node while don't 
> remove it from the cache? 
>  
> public Optional> currentData(ZPath path)
>  {
>  Entry entry = entries.remove(path);
>  if ( entry != null )
> { return Optional.of(new ZNodeImpl<>(path, entry.stat, entry.model)); }
> return Optional.empty();
>  }
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CURATOR-546) currentData in ModeledCacheImpl removes ZPath from cache entries

2019-10-10 Thread Yang (Jira)


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

Yang updated CURATOR-546:
-
Attachment: (was: kafka-consumer-proxy-cpu-profile.svg)

> currentData in ModeledCacheImpl removes ZPath from cache entries 
> -
>
> Key: CURATOR-546
> URL: https://issues.apache.org/jira/browse/CURATOR-546
> Project: Apache Curator
>  Issue Type: Bug
>  Components: Client, Framework
>Affects Versions: 4.2.0
>Reporter: Yang
>Priority: Blocker
>
> I'm using AsyncCuratorFramework with cache, during testing I noticed that 
> *client.cache().currentChildren()* not also return the full list of 
> children, by digging into *ModeledCacheImpl*, apparently some children been 
> deleted when I call *client.cache().currentData()*. 
> What's the alternative for me if I wants to get cached node while don't 
> remove it from the cache? 
>  
> public Optional> currentData(ZPath path)
>  {
>  Entry entry = entries.remove(path);
>  if ( entry != null )
> { return Optional.of(new ZNodeImpl<>(path, entry.stat, entry.model)); }
> return Optional.empty();
>  }
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CURATOR-546) currentData in ModeledCacheImpl removes ZPath from cache entries

2019-10-10 Thread Jordan Zimmerman (Jira)


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

Jordan Zimmerman updated CURATOR-546:
-
Priority: Blocker  (was: Major)

> currentData in ModeledCacheImpl removes ZPath from cache entries 
> -
>
> Key: CURATOR-546
> URL: https://issues.apache.org/jira/browse/CURATOR-546
> Project: Apache Curator
>  Issue Type: Bug
>  Components: Client
>Affects Versions: 4.2.0
>Reporter: Yang
>Priority: Blocker
> Attachments: kafka-consumer-proxy-cpu-profile.svg
>
>
> I'm using AsyncCuratorFramework with cache, during testing I noticed that 
> *client.cache().currentChildren()* not also return the full list of 
> children, by digging into *ModeledCacheImpl*, apparently some children been 
> deleted when I call *client.cache().currentData()*. 
> What's the alternative for me if I wants to get cached node while don't 
> remove it from the cache? 
>  
> public Optional> currentData(ZPath path)
>  {
>  Entry entry = entries.remove(path);
>  if ( entry != null )
> { return Optional.of(new ZNodeImpl<>(path, entry.stat, entry.model)); }
> return Optional.empty();
>  }
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CURATOR-546) currentData in ModeledCacheImpl removes ZPath from cache entries

2019-10-10 Thread Jordan Zimmerman (Jira)


[ 
https://issues.apache.org/jira/browse/CURATOR-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16948687#comment-16948687
 ] 

Jordan Zimmerman commented on CURATOR-546:
--

Yuck - this looks like a pretty bad copy/paste bug. There might be some kind of 
ugly workaround until we have a fix. Let me think about it.

> currentData in ModeledCacheImpl removes ZPath from cache entries 
> -
>
> Key: CURATOR-546
> URL: https://issues.apache.org/jira/browse/CURATOR-546
> Project: Apache Curator
>  Issue Type: Bug
>  Components: Client, Framework
>Affects Versions: 4.2.0
>Reporter: Yang
>Priority: Blocker
> Attachments: kafka-consumer-proxy-cpu-profile.svg
>
>
> I'm using AsyncCuratorFramework with cache, during testing I noticed that 
> *client.cache().currentChildren()* not also return the full list of 
> children, by digging into *ModeledCacheImpl*, apparently some children been 
> deleted when I call *client.cache().currentData()*. 
> What's the alternative for me if I wants to get cached node while don't 
> remove it from the cache? 
>  
> public Optional> currentData(ZPath path)
>  {
>  Entry entry = entries.remove(path);
>  if ( entry != null )
> { return Optional.of(new ZNodeImpl<>(path, entry.stat, entry.model)); }
> return Optional.empty();
>  }
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CURATOR-546) currentData in ModeledCacheImpl removes ZPath from cache entries

2019-10-10 Thread Jordan Zimmerman (Jira)


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

Jordan Zimmerman updated CURATOR-546:
-
Component/s: Framework

> currentData in ModeledCacheImpl removes ZPath from cache entries 
> -
>
> Key: CURATOR-546
> URL: https://issues.apache.org/jira/browse/CURATOR-546
> Project: Apache Curator
>  Issue Type: Bug
>  Components: Client, Framework
>Affects Versions: 4.2.0
>Reporter: Yang
>Priority: Blocker
> Attachments: kafka-consumer-proxy-cpu-profile.svg
>
>
> I'm using AsyncCuratorFramework with cache, during testing I noticed that 
> *client.cache().currentChildren()* not also return the full list of 
> children, by digging into *ModeledCacheImpl*, apparently some children been 
> deleted when I call *client.cache().currentData()*. 
> What's the alternative for me if I wants to get cached node while don't 
> remove it from the cache? 
>  
> public Optional> currentData(ZPath path)
>  {
>  Entry entry = entries.remove(path);
>  if ( entry != null )
> { return Optional.of(new ZNodeImpl<>(path, entry.stat, entry.model)); }
> return Optional.empty();
>  }
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)