edgent-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Susan L. Cline" <home4...@yahoo.com.INVALID>
Subject Re: StreamScope and the console
Date Wed, 28 Sep 2016 16:24:52 GMT
Ah ... okay. I kind of wondered about that. I'll try that. Thanks. 

Take care,

Susan

> On Sep 28, 2016, at 8:49 AM, Dale LaBossiere <dml.apache@gmail.com> wrote:
> 
> Off the top of my head…
> 
> Seems possible (likely?) that no tuples arrived between enabling the StreamScope and
calling getSamples().
> Samples aren’t captured until the StreamScope is enabled and ultimately the servlet
will have to periodically call getSamples().
> 
> Note, StreamScope.java has doc that may help clarify things beyond what’s in StreamScopeMXBean
doc.
> 
> Yup, DevelopmentProvider injects StreamScope oplets alongside of the injected Metric
oplets.  Both are presented as little grey boxes in a stream and you can hover on them.
> 
> — Dale
> 
>> On Sep 27, 2016, at 4:50 PM, Susan Cline <home4slc@pacbell.net> wrote:
>> 
>> ...
>> Here is the simple code in the servlet:
>> 
>>            StreamScopeMXBean sScopeBean = StreamScopeUtil.getStreamScope(jobId, opletId,
Integer.parseInt(outputPort));
>>            if (sScopeBean != null) {            
>>                sScopeBean.setEnabled(true);
>>                System.out.println("is streamScopeMXBean enabled? " + sScopeBean.isEnabled());
>>    
>>                String sampleScope = sScopeBean.getSamples();
>>                System.out.println("sampleScope: " + sampleScope);
>>                Gson gson = new Gson();
>>                    response.setContentType("application/json");
>>                    response.setCharacterEncoding("UTF-8");
>>                    response.getWriter().write(gson.toJson(sampleScope));
>>            }
>> 
>> The output to the command line is:
>> 
>> is streamScopeMXBean enabled? true
>> sampleScope: []
> 

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message