View custom.java
class Config extends AbstractCouchbaseConfiguration {
protected List<String> getBootstrapHosts() {
return Arrays.asList("127.0.0.1");
}
protected String getBucketName() {
return "travel-sample";
}
View flatbuffers-bindings.rs
/* automatically generated by rust-bindgen */
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage, Align>
where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
storage: Storage,
align: [Align; 0],
View code.java
final Scope scope = env.tracer()
.buildSpan("query-and-fetch")
.startActive(true);
bucket.async()
.query(N1qlQuery.simple("select meta().id as id from `travel-sample` limit 10"), scope.span())
.flatMap(new Func1<AsyncN1qlQueryResult, Observable<AsyncN1qlQueryRow>>() {
public Observable<AsyncN1qlQueryRow> call(AsyncN1qlQueryResult result) {
return result.rows();
}
View gist:f0ebc85f9201cbbc67d0f4550c8e4a3d
+-------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
+--------+-------------------------------------------------+----------------+
|00000000| 80 01 00 03 08 02 00 73 00 00 00 3f 00 00 00 03 |.......s...?....|
|00000010| 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 |................|
|00000020| 66 6f 6f |foo |
+--------+-------------------------------------------------+----------------+
[cb-io-1-1] 2018-01-31 13:17:19 TRACE LoggingHandler:94 - [id: 0x886cc9fb, L:/10.142.171.1:49692 - R:/10.142.171.101:11210] WRITE: 52B
+-------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
View gist:50bf4934a827f38c5cf38ad256ef5c26
[cb-io-1-1] 2018-01-31 07:38:27 TRACE LoggingHandler:94 - [id: 0xe0493676, L:/10.142.171.1:56858 - R:/10.142.171.101:11210] WRITE: 35B
+-------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
+--------+-------------------------------------------------+----------------+
|00000000| 80 01 00 03 08 02 00 73 00 00 00 0d 00 00 00 01 |.......s........|
|00000010| 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 |................|
|00000020| 66 6f 6f |foo |
+--------+-------------------------------------------------+----------------+
[cb-io-1-1] 2018-01-31 07:38:27 TRACE LoggingHandler:94 - [id: 0xe0493676, L:/10.142.171.1:56858 - R:/10.142.171.101:11210] WRITE: 4B
+-------------------------------------------------+
View main.rs
#[macro_use]
extern crate mozjs;
use mozjs::jsapi::CompartmentOptions;
use mozjs::jsapi::JS_NewGlobalObject;
use mozjs::jsapi::OnNewGlobalHookOption;
use mozjs::jsval::{Int32Value, UndefinedValue};
use mozjs::rust::{Runtime, SIMPLE_GLOBAL_CLASS};
use std::ptr;
View negotiation
[cb-io-1-1] 2018-01-29 15:08:25 DEBUG KeyValueFeatureHandler:126 - Requesting supported features: [TCPNODELAY, XATTR, SELECT_BUCKET, SNAPPY, XERROR]
[cb-io-1-1] 2018-01-29 15:08:25 TRACE LoggingHandler:94 - [id: 0x5b109a0c, L:/10.142.171.1:54661 - R:/10.142.171.101:11210] WRITE: 190B
+-------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
+--------+-------------------------------------------------+----------------+
|00000000| 80 1f 00 a6 00 00 00 00 00 00 00 b0 00 00 00 00 |................|
|00000010| 00 00 00 00 00 00 00 00 63 6f 75 63 68 62 61 73 |........couchbas|
|00000020| 65 2d 6a 61 76 61 2d 63 6c 69 65 6e 74 2f 32 2e |e-java-client/2.|
|00000030| 35 2e 35 2d 53 4e 41 50 53 48 4f 54 20 28 67 69 |5.5-SNAPSHOT (gi|
|00000040| 74 3a 20 32 2e 35 2e 34 2d 32 2d 67 66 31 33 66 |t: 2.5.4-2-gf13f|
View jaeger.java
import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.Cluster;
import com.couchbase.client.java.CouchbaseCluster;
import com.couchbase.client.java.document.JsonDocument;
import com.couchbase.client.java.document.json.JsonObject;
import com.couchbase.client.java.env.CouchbaseEnvironment;
import com.couchbase.client.java.env.DefaultCouchbaseEnvironment;
import com.uber.jaeger.Configuration;
import io.opentracing.Tracer;
View show.hbs
import Ember from 'ember';
export default Ember.Component.extend({
didReceiveAttrs() {
this._super(...arguments);
const viz = this.get('viz');
Ember.Logger.info(viz.get('type')); // <--here data is undefined?
},
});
View fun.rs
pub fn from_config<S>(config: &BackendConfig) -> Result<impl Backend<S>, BackendError> where S: IntoBuf + 'static {
match config.name() {
"stdout" => Ok(StdoutBackend::stdout()),
"stderr" => Ok(StderrBackend::stderr()),
n => Err(BackendError::UnsupportedBackend(n.into())),
}
}