Skip to main content

Posts

Showing posts from 2018

Waiting Animation in Python Script

It is very often that we are writing some scripts and we need to put some sleep before executing the next step. During the sleep time of script Either you can use simple sleep and print a line or you can use little waiting animation during the sleep. Try running the below script, It will provide you some animation during sleeping time. The script is quite simple and self-explanatory. Feel free to modify and experiment with the script to get some kooler waiting animation. import time import sys import random ###################- Core Methods -################ def next_pos(i, fwd): if fwd: return i+1 else: return i-1; def nextchar_cursor(pattern): while True: for cursor in pattern: yield cursor #######- Simple spin and wait -##################### def spinner(speed, wt): cursor = nextchar_cursor("-/\\|") st = 1.0 / speed for i in range(wt): rs = "%3d" % (wt-i) for j in range(speed):

java.lang.IllegalArgumentException: Could not instantiate implementation: org.janusgraph.diskstorage.cassandra.thrift.CassandraThriftStoreManager

If you are trying to get started with Janus Graph with Apache Cassandra. You may get the following error. Caused by: org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend at org.janusgraph.diskstorage.cassandra.thrift.CassandraThriftStoreManager.getCassandraPartitioner(CassandraThriftStoreManager.java:219) ~[janusgraph-cassandra-0.2.0.jar:na] at org.janusgraph.diskstorage.cassandra.thrift.CassandraThriftStoreManager.<init>(CassandraThriftStoreManager.java:198) ~[janusgraph-cassandra-0.2.0.jar:na] ... 48 common frames omitted Caused by: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused) at org.apache.thrift.transport.TSocket.open(TSocket.java:187) ~[libthrift-0.9.2.jar:0.9.2] at org.apache.thrift.transport.TFramedTransport.open(TFramedTransport.java:81) ~[libthrift-0.9.2.jar:0.9.2] at org.janusgraph.diskstorage.cassandra.thrift.thriftpool.CTConnectionFactory.makeR