in couchbase SDK version 3 I can't find consistency set in the insert and find query like java
N1qlParams adhoc2 = N1qlParams.build().consistency(ScanConsistency.STATEMENT_PLUS).adhoc(true);
is that deprecated?
and if it's deprecated how can I fix this problem?
regards.
checkout options of cluster.query()
https://docs.couchbase.com/sdk-api/couchbase-node-client/Cluster.html#query
Check out the class QueryScanConsistency
cluster.query(queryString, QueryOptions.queryOptions()
.scanConsistency(QueryScanConsistency.REQUEST_PLUS) )
.rowsAs(MyEntity.class)
You should use REQUEST_PLUS instead of STATEMENT_PLUS
Related
Below code worked for Dataflow 1.9 sdk, migrating to 2.X
PCollection<TableRow> tableRow = ...
tableRow.apply(BigQueryIO.Write()
.to(String.format("%1$s:%2$s.%3$s",projectId, bqDataSet, bqTable))
.withSchema(schema)
.withWriteDisposition(BigQueryIO.Write.WriteDisposition.WRITE_APPEND));
I get
The method apply(PTransform<? super PCollection<TableRow>,OutputT>) in the type PCollection<TableRow> is not applicable for the arguments (BigQueryIO.Write<Object>)
Release notes are not much of a help here and documentation on 2.X is non existant redirects to beam API page.
Have you tried using BigqueryIO.writeTableRows()?
Apache Beam 2.1.0 BigqueryIO documentation
https://beam.apache.org/documentation/sdks/javadoc/2.1.0/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.html
You can try providing TableRow type explicitly (BigQuery.<TableRow>write()...) or use BigQuery.writeTableRows() as suggested above.
Looks like the interface was made generic in 2.x. Earlier version had TableRow hard coded.
I am trying to create my composite LWM2M object by using objlink type.
For Leshan, the only source on how to write the spec file in JSON seems to be the official oma-objects-spec.json, which does not contain examples of objlinks.
Can anyone provide an example on how to create an objlink object?
If it is not possible in Leshan, have anyone tried other implementations?
Hope it's not too late.
As of now there is no support of OBJLNK in Leshan API.
I was also needed OBJLNK support in Leshan so i have modified and created a pull request for supporting OBJLNK.
If you want to have objlnk support can use my branch which is forked from Leshan.
https://github.com/DevendraKurre/leshan
Leshan has added support to this feature. I have tested it with version 0.1.11-M14.
Reading can be done as usual, and writing is done as follows.
WriteRequest writeReq = new WriteRequest(
WriteRequest.Mode.UPDATE,
9, 0,
LwM2mSingleResource.newObjectLinkResource(
13,
new ObjectLink(5566, 7788)
)
);
I would like to work with Neo4j packages for java.
I see that the function newEmbeddedDatabaseBuilder is deprecated.
What is the best way to work now with Neo4j using java code?
thanks
In Neo4j 3.0, you'll use the GraphDatabaseFactory-
graphDb = new GraphDatabaseFactory().newEmbeddedDatabase( DB_PATH );
The Neo4j Java manual is available here: http://neo4j.com/docs/java-reference/current/#tutorials-java-embedded
I'm not sure what I'm doing wrong here, and am hoping someone else has the same problem. I don't get any error, and my json matches what should be correct both on Jira's docs and jira-python questions online. My versions are valid Jira versions. I also have no problem doing this directly through the API, but we are re-writing everything to go through jira-python for cleanliness/ease of use.
This just completely clears the fixVersions field in Jira.
issue=jira.issue("TKT-100")
issue.update(fields={'fixVersions':[{'add': {'name': 'add_me'}},{'remove': {'name': 'remove_me'}}]})
I can add a new version to fixVersions using issue.add_field_value(), but this won't work, because I need to add and remove in one request for the history of the ticket.
issue.add_field_value('fixVersions', {'name': 'add_me'})
Any ideas?
Here's a code example of how I got it working for anyone who comes across this later...
fixVersions = []
issue = jira.issue('issue_key')
for version in issue.fields.fixVersions:
if version.name != 'version_to_remove':
fixVersions.append({'name': version.name})
fixVersions.append({'name': 'version_to_add'})
issue.update(fields={'fixVersions': fixVersions})
I did it other way:
Create version in the target project.
Update ticket.
ver = jira.create_version(name='version_name', project='PROJECT_NAME')
issue = jira.issue('ISSUE_NUM')
i.update(fields={'fixVersions': [{'name': ver.name}]})}
In my case that worked.
A little bit more pythonic version of user797963 solution, may look like that.
def change_fix_version(tickets, remove_versions=[], add_versions=[]):
fix_versions={version.name for version in ticket.fields.fixVersions}
fix_versions.difference_update(set(remove_versions))
fix_versions.update(set(add_versions))
ticket.update(fields={'fixVersions':fix_versions})
You would call it like that:
change_fix_versions(jira.issue('my_issue'), remove_versions=['draft'], add_versions=['master', 'release'])
Does anyone know how we can get previous versions of z3 for linux 64? I am using Ubuntu 10.04 and it does not include GLIBGXX 3.4.14 which is required by z3 3.2 (the version I currently have). So I was wondering if I could get access to a previous version.
Also if anyone knows how can I overcome this problem (maybe a way to get GLIBCXX 3.4.14) on Ubuntu 10.04 I would appreciate the help.
Thanks
The old versions are still available on the Z3 website. However, we do not provide links to them. You can download them from
http://research.microsoft.com/en-us/um/redmond/projects/z3/
Here is the complete list:
z3-2.0.1.tar.gz
z3-2.10.tar.gz
z3-2.11.tar.gz
z3-2.12.tar.gz
z3-2.13.tar.gz
z3-2.15.tar.gz
z3-2.17.tar.gz
z3-2.18-x64.tar.gz
z3-2.18.1.tar.gz
z3-2.18.tar.gz
z3-2.19.1.tar.gz
z3-2.19.tar.gz
z3-2.2.tar.gz
z3-2.3.1.tar.gz
z3-2.3.tar.gz
z3-2.4.1.tar.gz
z3-2.4.tar.gz
z3-2.5.tar.gz
z3-2.6.tar.gz
z3-2.7.tar.gz
z3-2.8.tar.gz
z3-3.0-x64.tar.gz
z3-3.0.tar.gz
z3-3.1.tar.gz
z3-3.2.beta.tar.gz
z3-3.2.tar.gz
z3-4.0.tar.gz
z3-osx-3.2.1.tar.gz
z3-osx-3.2.tar.gz
z3-osx-4.0-preview.tar.gz
z3-osx-4.0.tar.gz
z3-osx32-4.0.tar.gz
z3-x64-2.15.tar.gz
z3-x64-2.18.tar.gz
z3-x64-2.19.tar.gz
z3-x64-3.0.tar.gz
z3-x64-3.1.tar.gz
z3-x64-3.2.beta.tar.gz
z3-x64-3.2.tar.gz
z3-x64-4.0.tar.gz
Leonardo is right, but you can't find the download link in that page.
You must use the list of programs and use something like:
http://research.microsoft.com/en-us/um/redmond/projects/z3/z3-3.2.tar.gz
. You can change the filename in bold by one in the list provided by Leonardo.