Gremlin DSE Graph Error: schema.getClass() - datastax

Using the Datastax Sandbox 5.0 in Virtual Box. Transcript below... the command from the tutorial doesn't work. I used a ":remote" command from TP3 documentation since I couldn't find what to use for DSE Graph. It worked, but not sure my steps are correct.
gremlin> :remote connect tinkerpop.server conf/remote.yaml
==>Configured localhost/127.0.0.1:8182 gremlin> system.describe()
==>system.graph("STUDIO_TUTORIAL_GRAPH").create() system.graph("KillrVideo").create() gremlin> schema.getClass() No such
property: schema for class: Script1 Display stack trace? [yN]
gremlin>

When you issue this command:
gremlin> :remote connect tinkerpop.server conf/remote.yaml
you create a "remote". That part is fine, however you then need to send your requests to DSE Graph via :submit or it's more commonly used alias :>:
gremlin> :> schema.getClass()
Alternatively, you can put the "remote" in console mode by doing:
:remote console
at which point you can then issue your command as:
gremlin> schema.getClass()
The Gremlin Console packaged with DSE should do this for you automatically at startup. It should configure the remote and set it up for console mode out of the box. It's odd that this is not happening for you.

Related

Error Connecting to Substrate: Unable to initialize the API: createType(StorageKey):: Derived

I've got a Substrate node running locally on my PC, following this tutorial. https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/interact. It can be viewed on two ports:
Local: http://localhost:8000/substrate-front-end-template
On Your Network: http://192.168.56.1:8000/substrate-front-end-template
So I don't think connectivity is the issue.
Anyway, I bound the #polkadot/api to my node via the command:
yarn add #polkadot/api.
I'm now getting an error, in the browser, whenever I run my node:
Error Connecting to Substrate
Error: FATAL: Unable to initialize the API: createType(StorageKey):: Derived TypedArray constructor created an array which was too small
Can anyone help?
Upgrading to the latest Substrate Sidecar API resolved these issues for me.

How to receive tile data from ClusterBuster vector tile server in the sample example?

Summary
Seems the guys did a great work with the built-in filtering, clustering and caching on the ClusterBuster vector tile server.
I'm really excited about this project that looks very promising and i'm eager to try it!
I'm working on a project on plotting Deck.gl layers (MVTLayer) on top of Google Maps from a vector tile server through their integration.
I want to try to integrate and to serve from ClusterBuster server some clustered points saved in PostGIS.
Expected result:
I want to receive tile data from ClusterBuster vector tile server like in their provided sample example.
Actual result:
Provided sample example not working (points not showing on map, neither on Mapbox, nor on Google Maps with Deck.gl).
My attempts
I tried building and running the example provided but somehow, i'm not able to do this.
I ran the provided express server clusterbuster/example/express.ts and for frontend tried with the provided mapbox example from clusterbuster/example/mapbox.html (with my mapbox token) but nothing appears on mapbox map (nor on Google maps with my Deck.gl example).
As stated in the clusterbuster/example/readme.md i created an .env file with PostGIS connections settings.
After running the following commands:
yarn
yarn start
i get this output:
C:\zFVStuff\Google Maps - Deck.gl\_Servers\ClusterBuster\clusterbuster-master> yarn start
yarn run v1.22.4
$ yarn build && ts-node example/express.ts
$ rollup --config rollup.config.js
./lib/index.ts → dist/index.d.ts...
created dist/index.d.ts in 5.7s
./lib/index.ts → dist/index.js...
created dist/index.js in 5.1s
attempting to create supporting SQL functions
failure in creating First SQL function
failure in creating TileBBox SQL function
failure in creating TileDoubleBBox SQL function
Example app listening on port 3005!
send3663284b-0e58-4587-af82-b35604a99303: 4.964ms
3663284b-0e58-4587-af82-b35604a99303: 817.819ms
sendd0bdd671-1f47-4b40-84ba-2fed6adfd045: 3.451ms
d0bdd671-1f47-4b40-84ba-2fed6adfd045: 1276.588ms
sendcd36f672-4c4b-4a95-b772-7584e6eb8c55: 1.349ms
cd36f672-4c4b-4a95-b772-7584e6eb8c55: 1754.146ms
The requests seems to be ok, returning status 200 but tile data from ClusterBuster server is undefined nothing appears on the map (neither your Mapbox, or my Google Maps).
Also, it's curious that all tile responses seems to have the same size 216 B.
The data was imported ok in the PostGIS database.
Result is undefined after debugging the express.ts server file with VSCode Javascript Debug Terminal and starting it with the command ts-node .\example\express.ts.
In the Chrome network tab, in none of the sub-tabs Preview or Response i can't see any data.
I also tried logging the result tile in the express server in the success function,
server({
...//excluded for visibility
}).then(result => {
...//excluded for visibility
console.log(result)
res.status(200).send(result);
})
and below is the output, i get undefined:
Any help or advice is really appreciate! Thank you in advance!
After enabling debug in the TileServer configuration (with debug: true), i noticed 2 errors:
SELECT ST_AsMVT(tile, 'points', 4096, 'geom') AS mvt FROM tile
{
e: error: password authentication failed for user "userXYZ"
...
SELECT ST_AsMVT(tile, 'points', 4096, 'geom') AS mvt FROM tile
{
e: Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:205:27) {
...
Initially I ran from the root of clusterbuster with ts-node .\example\express.ts or with yarn start (that underneath uses the same and it tries to connect with my user instead of .env config file)
After running ts-node express.ts from the example folder it took into account the .env config file with postgres user instead of my user. Now the tile data from the server is returned ok and the example works at expected.
Many thanks to the contributor cosmin-petrescu that helped me.
Entire thread can be seen here on github.

Janus Graph Remote Graph NoSuchFieldError: V3_0 error

I follow this example;
https://github.com/JanusGraph/janusgraph/tree/master/janusgraph-examples/example-remotegraph
and I would like to debug this project, I configured(HBase+Solr) and run Janus Graph server with
$JANUSGRAPH_HOME/bin/gremlin-server.sh $JANUSGRAPH_HOME/conf/gremlin-server/gremlin-server.yaml
command.
I passed this argument to IDEA via Run Configuration > Program Arguments
[Project Home]/conf/jgex-remote.properties
my jgex-remote.properties file is:
gremlin.remote.remoteConnectionClass=org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection
# cluster file has the remote server configuration
gremlin.remote.driver.clusterFile=[Project Home]/conf/remote-objects.yaml
# source name is the global graph traversal source defined on the server
gremlin.remote.driver.sourceName=g
and my remote-objects.yaml file includes:
hosts: [127.0.0.1]
port: 8182
serializer: {
className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0,
config: {
ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry]
}
}
It tries to run this command:
cluster = Cluster.open(conf.getString("gremlin.remote.driver.clusterFile"));
And throws this exception:
Exception in thread "main" java.lang.NoSuchFieldError: V3_0 at
org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0.(GryoMessageSerializerV3d0.java:41)
at
org.apache.tinkerpop.gremlin.driver.ser.Serializers.simpleInstance(Serializers.java:77)
at
org.apache.tinkerpop.gremlin.driver.Cluster$Builder.(Cluster.java:472)
at
org.apache.tinkerpop.gremlin.driver.Cluster$Builder.(Cluster.java:469)
at
org.apache.tinkerpop.gremlin.driver.Cluster.getBuilderFromSettings(Cluster.java:167)
at
org.apache.tinkerpop.gremlin.driver.Cluster.build(Cluster.java:159)
at org.apache.tinkerpop.gremlin.driver.Cluster.open(Cluster.java:233)
at
com.ets.dataplatform.init.RemoteGraphApp.openGraph(RemoteGraphApp.java:72)
at com.ets.dataplatform.init.GraphApp.runApp(GraphApp.java:290) at
com.ets.dataplatform.init.RemoteGraphApp.main(RemoteGraphApp.java:195)
It is not meaningful for me.
Thanks in advance.
I would try to align your versions. I assume that you are using JanusGraph 0.2.0. If you look at the pom.xml for that version you'll see that it is bound to TinkerPop 3.2.6:
https://github.com/JanusGraph/janusgraph/blob/v0.2.0/pom.xml#L68
Change to that version in your application and see if the connection works. Taking that approach should not only fix your problem but also ensure that you don't run into other incompatibilities. That is not to say that you can't configure later versions of TinkerPop to work with 3.2.6, but it requires a bit more configuration and you have to be aware of minor changes that might affect how certain operations might behave.

Adding Files view on Ambari 1.7.0: ClassNotFoundException

I'm trying to add views on Ambari 1.7.0.
For the Files view that is available here: https://github.com/apache/ambari/tree/trunk/contrib/views/files
I get an error after trying to launch an instance of the view:
500 HdfsApi connection failed. Check "webhdfs.url" property
With the following Stack Trace (just the first lines):
java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.hdfs.web.WebHdfsFileSystem not found
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1720)
at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:2415)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2428)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:88)
at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2467)
I just add the following property during the configuration of the view:
webhdfs.url webhdfs://mycluster1:50070
I'm not sure but perhaps it's an issue during the building part like version conflict, i'm working on that.
Any ideas?
What is the value you have used for WebHDFS url in file view instance ?
Is your cluster Namenode HA enabled ? If yes , try to use url as webhdfs://:50070
If not HA enabled the use webhdfs://:50070
If none works use direct data node dfs address as webhdfs://:50070

Error trying to connect to panda

I am following panda guide to integrate a rails app to panda for embedding a video in my app.
I have setup the panda.yml as follows:
development:
access_key: 805264cac2c2cbf61e69
secret_key: 133aa3bbf1d8cdf56f13
cloud_id: cloudbear
My panda.rb initializer file has the following (I do not want to host this app in heroku):
Panda.configure((ENV['PANDASTREAM_URL'] ||
YAML::load_file(File.join(File.dirname(__FILE__),"..",
"panda.yml"))[Rails.env]))
My gemfile:
gem 'panda', '~> 1.5.0'
When I try to fire up the rails console I get:
/home/vasu/.rvm/gems/ruby-1.8.7-p371/gems/panda-1.5.0/lib/panda/panda.rb:12:in
`configure': missing auth params or block (ArgumentError)
A look at the configure method inside the panda module shows that it expects either auth_params or block.
What do I seem to be missing in my configuration?
When i put in the cloud id (instead of its name as I had done above), I am able to fire up the rails console and connect to panda. cheers!