Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add or-tools #2377

Merged
merged 7 commits into from
Mar 4, 2020
Merged

Add or-tools #2377

merged 7 commits into from
Mar 4, 2020

Conversation

SHaaD94
Copy link
Collaborator

@SHaaD94 SHaaD94 commented Feb 26, 2020

Copy link
Collaborator

@REASY REASY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff!

@REASY
Copy link
Collaborator

REASY commented Feb 27, 2020

I can see some failed tests, https://beam-ci.tk/job/beam-4ci/7541/consoleFull:

java.io.IOError: java.io.IOException: Wrong index checksum, store was not closed properly and could be corrupted.
00:14:18   at org.mapdb.StoreDirect.checkHeaders(StoreDirect.java:269)
00:14:18   at org.mapdb.StoreDirect.<init>(StoreDirect.java:207)
00:14:18   at org.mapdb.DBMaker.extendStoreDirect(DBMaker.java:971)
00:14:18   at org.mapdb.DBMaker.makeEngine(DBMaker.java:758)
00:14:18   at org.mapdb.DBMaker.make(DBMaker.java:701)
00:14:18   at com.conveyal.osmlib.OSM.<init>(OSM.java:106)
00:14:18   at com.conveyal.r5.transit.TransportNetwork.fromFiles(TransportNetwork.java:198)
00:14:18   at com.conveyal.r5.transit.TransportNetwork.fromFiles(TransportNetwork.java:178)
00:14:18   at com.conveyal.r5.transit.TransportNetwork.fromDirectory(TransportNetwork.java:306)
00:14:18   at beam.router.r5.NetworkCoordinator.loadNetwork(NetworkCoordinator.scala:77)
00:14:18   ...
00:14:18   Cause: java.io.IOException: Wrong index checksum, store was not closed properly and could be corrupted.
00:14:18   at org.mapdb.StoreDirect.checkHeaders(StoreDirect.java:269)
00:14:18   at org.mapdb.StoreDirect.<init>(StoreDirect.java:207)
00:14:18   at org.mapdb.DBMaker.extendStoreDirect(DBMaker.java:971)
00:14:18   at org.mapdb.DBMaker.makeEngine(DBMaker.java:758)
00:14:18   at org.mapdb.DBMaker.make(DBMaker.java:701)
00:14:18   at com.conveyal.osmlib.OSM.<init>(OSM.java:106)
00:14:18   at com.conveyal.r5.transit.TransportNetwork.fromFiles(TransportNetwork.java:198)
00:14:18   at com.conveyal.r5.transit.TransportNetwork.fromFiles(TransportNetwork.java:178)
00:14:18   at com.conveyal.r5.transit.TransportNetwork.fromDirectory(TransportNetwork.java:306)
00:14:18   at beam.router.r5.NetworkCoordinator.loadNetwork(NetworkCoordinator.scala:77)

@REASY
Copy link
Collaborator

REASY commented Feb 28, 2020

test!

@SHaaD94
Copy link
Collaborator Author

SHaaD94 commented Feb 28, 2020

test!

@SHaaD94
Copy link
Collaborator Author

SHaaD94 commented Feb 28, 2020

test!

@haitamlaarabi
Copy link
Collaborator

On Mac, i'm getting:
Exception in thread "main" java.lang.VerifyError: class org.openstreetmap.osmosis.osmbinary.Fileformat$BlobHeader overrides final method getParserForType.()Lcom/google/protobuf/Parser; at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) at java.net.URLClassLoader.access$100(URLClassLoader.java:74) at java.net.URLClassLoader$1.run(URLClassLoader.java:369) at java.net.URLClassLoader$1.run(URLClassLoader.java:363) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:362) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.openstreetmap.osmosis.osmbinary.file.FileBlockHead.readHead(FileBlockHead.java:56) at org.openstreetmap.osmosis.osmbinary.file.FileBlock.process(FileBlock.java:130) at org.openstreetmap.osmosis.osmbinary.file.BlockInputStream.process(BlockInputStream.java:34) at com.conveyal.osmlib.PBFInput.copyTo(PBFInput.java:237) at com.conveyal.osmlib.OSM.readFromFile(OSM.java:202) at com.conveyal.r5.transit.TransportNetwork.fromFiles(TransportNetwork.java:200) at com.conveyal.r5.transit.TransportNetwork.fromFiles(TransportNetwork.java:178) at com.conveyal.r5.transit.TransportNetwork.fromDirectory(TransportNetwork.java:306) at beam.router.r5.NetworkCoordinator.loadNetwork(NetworkCoordinator.scala:77) at beam.router.r5.NetworkCoordinator.loadNetwork$(NetworkCoordinator.scala:56)

this is probably due to protobuf-java, coming with or-tools. What about adding a gradle exception that excludes that jar from loading!?

Copy link
Collaborator

@JustinPihony JustinPihony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this PR ready for review? I only see it loading and not doing anything with it right now. Also, is there a reason for using com.github? It's not a huge jump to figure out at this early stage that it is something in our control, but later it could pose more of a challenge for newcomers to understand that this is an lbnl tool - not GitHub.

@SHaaD94
Copy link
Collaborator Author

SHaaD94 commented Mar 1, 2020

Is this PR ready for review? I only see it loading and not doing anything with it right now. Also, is there a reason for using com.github? It's not a huge jump to figure out at this early stage that it is something in our control, but later it could pose more of a challenge for newcomers to understand that this is an lbnl tool - not GitHub.

This PR is for replace existing 3rd party library for OR-Tools, it is being used in AlonsoMora pooling algorithm.
About com.github - we can rename it, just tell me preferred library package name.

@JustinPihony
Copy link
Collaborator

@wrashid @colinsheppard Any preference? Since it is for beam I'd say we stick with the beam namespace: beam.utilities.ortoolwrapper? And then it begs the question if this needs to be its own dependency or if it is small enough to be part of utilities itself?

@SHaaD94
Copy link
Collaborator Author

SHaaD94 commented Mar 2, 2020

test!

3 similar comments
@SHaaD94
Copy link
Collaborator Author

SHaaD94 commented Mar 2, 2020

test!

@REASY
Copy link
Collaborator

REASY commented Mar 2, 2020

test!

@REASY
Copy link
Collaborator

REASY commented Mar 2, 2020

test!

@REASY
Copy link
Collaborator

REASY commented Mar 2, 2020

Actual exception somehow is not visible. Here is what I see when I run ./gradlew specificTest -Psuite="beam.router.TollRoutingSpec" (make sure you removed files test\input\beamville\r5\osm.mapdb* and test/input/beamville/r5/network.dat)

*** RUN ABORTED ***
  java.lang.VerifyError: class org.openstreetmap.osmosis.osmbinary.Fileformat$BlobHeader overrides final method getParserForType.()Lcom/google/protobuf/Parser;
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
  at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
  at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
  ...
:specificTest FAILED

FAILURE: Build failed with an exception.

@haitamlaarabi
Copy link
Collaborator

It is still failing. the exclude doesn't work as protobuf is encapsulated inside the wrapper jar.
Screen Shot 2020-03-02 at 3 41 01 PM

@REASY
Copy link
Collaborator

REASY commented Mar 4, 2020

@JustinPihony I think it fine that we leave the name as is. For example, beam-utilities has the following naming:

group: 'com.github.LBNL-UCB-STI', name: 'beam-utilities', version: 'v0.2.4'

@REASY REASY merged commit a4fb0b1 into develop Mar 4, 2020
@REASY REASY deleted the ez/or-tools-4ci branch March 4, 2020 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants