How to use graph.openManagement().updateIndex()? - janusgraph

I have janusgraph database, in which all indexes were built.But the status of some of those indexes is installed. Now I am trying to update those Indexes to the registered and then to enabled. So I have done some research and I found this Action(schemaAction).But I don't know the syntax and also how to use graph.openManagement().updateIndex().
Any suggestions regarding this issue or if there is anything other than this procedure, then please let me know it.
Thanks in advance!

If there are any open transactions while creating the indexes they might get stuck in the INSTALLED state.
You can find a clear explanation here.
After rolling back your open transactions and closing open instances, try reindexing.
Note: Block until the SchemaStatus transitions from INSTALLED to REGISTERED, after running the reindex command. Try to run groovy script instead of running the commands directly on gremlin console for building the indexes. Please find the sample script below.
import org.janusgraph.graphdb.database.management.ManagementSystem
mgmt = graph.openManagement();
mgmt.updateIndex(mgmt.getGraphIndex("giftIdByGift"), SchemaAction.REGISTER_INDEX).get();
ManagementSystem.awaitGraphIndexStatus(graph, "giftIdByGift").call();
mgmt.commit();
mgmt = graph.openManagement();
mgmt.updateIndex(mgmt.getGraphIndex("giftIdByGift"), SchemaAction.REINDEX).get();
ManagementSystem.awaitGraphIndexStatus(graph, "giftIdByGift").status(SchemaStatus.ENABLED).call();
mgmt.commit();

Related

Unable to Create Common Data Service DB in Default Environment Power Apps

I am unable to create a new Common Data Service Database in my Power Apps default environment. Please see the error text below.
It looks like you don't have permission to use the Common Data Service
in this environment. Switch to a different environment, or create your
own.
Which as I understand I should be able to create after the Microsoft Business Application October 2018 update as listed in the article available at following link.
https://community.dynamics.com/365/b/dynamicscitizendeveloper/archive/2018/10/17/demystifying-dynamics-365-and-powerapps-environments-part-1
Also when I try to create a Common Data Service app in my default environment, I encounter following error.
The data did not load correctly. Please try again.
The environment 'Default-57e1485d-1197-4afd-b792-5c423ab508d9' is not
linked to a new CDS 2.0 instance. The operation 'ListInstanceMetadata'
is forbidden for unlinked environments
Moreover I am unable to see the default environment on https://admin.powerapps.com/environments, I can only see the Sandbox environment there.
Any ideas what I am missing here?
Thank you.
Someone else faced a similar issue and I read in one of the threads about deleting the browser cache and trying it again or trying it in a different browser resolved the issue. Could you try these first level steps and check if you still have these issues?
Ref: https://powerusers.microsoft.com/t5/Common-Data-Service-for-Apps/Default-Environment-Error-on-CDS/m-p/233582#M1281
Also, for your permission error ref: https://powerusers.microsoft.com/t5/Common-Data-Service-for-Apps/Common-Data-Service-Business-Flows/td-p/142053
I have not validated these findings. But as these answers are from MS and PowerApps team, hope it helps!

Clickhouse server failed to restart because of LowCardinality setting

I tried to play with LowCardinality setting, I got a message saying that this is an experimental feature and I have to SET allow_experimental_low_cardinality_type = 1 in order to use it.
I executed this command inside clickhouse-client and then I restarted the server. But I got
clickhouse-server.service: Unit entered failed state
Now I am trying to find out how to disable this setting and make my clickhouse-server start again.
Can you help with this please ?
PS: The version I use is the 18.12.17 and I installed it on Linux Ubuntu 16.04
ClickHouse has different layers for settings. If you used SET <setting> = <value> then you set it for current session. You don't need to restart ClickHouse. Please, take a look here.
I suppose you faced with another problem during starting your server. There a bunch of reasons why. So, firstly try to recollect what were done in configs since last restart (because you have just applied changes by restarting server).
Digging into logs also an awesome idea. Don't hesitate to check other similar issues on github.com, for example like this one

Parse migration tool stuck after canceling

So I have started the migration process from parse db to a mongolab db. The migration needed to be canceled at the verify stage. After pressing cancel, the migration tool is now stuck on the verify phase with no way to restart.
Has anyone else ran into this issue or have any ideas on how to restart the migration tool? Thanks ahead of time.
What I have attempted:
Removing and creating a new MongoLab DB
Multiple browsers
Logout/login
Parse Migration Tool Image
This issue seems to have been fixed on the parse side. But if it still happens, you have contact parse directly using the job id.
https://github.com/ParsePlatform/parse-server/issues/42
We discussed this here and basically in order to deal with migration
issues, we need you to individually report a bug through
parse.com/help. This allows each of you to get individual support,
from a team who can escalate issues, and for us to be able to ask up
front for specific information which will help us handle your issue.
We're exposing the 'job id' for the migration in the UI, and that is
something you should provide if you're having a problem.
Going to close this issue. For problems involving migration, or any
issues not specific to parse-server, please visit
https://parse.com/help and find the bug icon / "Something wrong?"
section to start the bug reporting flow.

Elastic Search JDBC River Plugin SQL Server Integrated Security

So I've been working on implementing elastic search using the JDBC River plugin to get data from our SQL Server DB into elastic search.
I've got it working fine using the SQL Server credentials, but trying to use integrated security doesn't work. It will create the index, but it doesn't have data in it.
The parameters I've been using are:
PUT /_river/test_river/_meta
{
"type":"jdbc",
"jdbc":
{
"driver":"com.microsoft.sqlserver.jdbc.SQLServerDriver",
"url":"jdbc:sqlserver://testServer:1433;databaseName=TestDb;
integratedSecurity=true;",
"user":"",
"password":"",
"sql": "select * from users",
"poll":"30s",
"index":"testindex",
"type":"testusers"
}
}
I've tried quite a few things, including removing the user and password fields completely, removing integratedSecurity=true, but it gave the same result.
I've checked on their github for the river plugin and it says this issue was fixed back in January, but it still doesn't seem to be working.
Also I'm using elastic search version: 1.5.1
and jdbc river plugin version : 1.4.0.10
Any help would be much appreciated
Get rid of the user and password options. You're not gonna need them.
Check the console when running elasticserch.bat, you should see an error message when it tries to update the river. I'm going to go out on a limb and assume you're probably seeing an error stating that the file sqljdbc_auth.dll can't be found. If this is the case, you can download this file from here and copy the x64 version of sqljdbc_auth.dll to your java lib folder. For me, this folder is C:\ProgramData\Oracle\Java\javapath but you can type echo %path% in a console window to find yours.
Once you have followed these steps, restart elasticsearch.bat, and it should start processing your river. If not, post back with the output you're seeing when running elasticsearch.bat.

Stopping the Magento indexing process

How can I stop the indexing process? I had imported 15,000 products and started the indexing, but now it's stuck on processing for "Category search index". It has been stuck on processing for two days now, how can I stop the indexing process?
Any help would be appreciated, thank you in advance.
When Magento starts indexing of each item in the 'Index Management' list it sets 'status' field of correlative entire of 'index_process' table to 'working'. If error happens during the indexing process script halts and status remains as 'working'. As a result 'processing' image hangs at the 'Index Management' page. Of course there's no way to make sure that indexing process is still not running but checking your server's processes list (or brutal restarting or your apache).
The only intelligent way I know to solve this issue is to find out what causing this error and fix it. You can do it by running indexing from your shell and looking for the output. Here is the command:
php shell/indexer.php reindexall
If you don't have an SSH access you can also try locating this error from your server's error logs.
If you just want to remove 'processing' image you can just run the following MYSQL query:
UPDATE `index_process` SET `status` = 'pending' WHERE `status` = 'working'
However this will not solve the problem, but only hide the output.
Probably the easiest way is to restart Apache. It will gracefully close any open visitor connections, and should terminate the PHP process.
--------- EDIT ----------
There are a set of tables in the database that look to be related to the indexing, index_process and index_process_event. You could try reverting the state of the relevant record there to pending and try again...
Keep in mind, if you are running magento under a different user than the one you are currently using (www-data vs mySshLoginUser), you might open yourself up to permissions problems on the lock files. If you have manually run the shell indexer, those lock files will belong to your ssh user.
Worst case scenario, delete those lock files in var/locks/* and try it.

Resources