Commit 4246835c by Adi Amir

Merge remote-tracking branch 'origin/master'

parents 7837eadc d5ec7c98
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
No preview for this file type
#create index with mapping
curl -XPUT "http://localhost:9200/activityidx" -d'{ "mappings": { "activity": { "properties": { "metaData.loc": { "type": "geo_point" } } } } }'
- https://www.elastic.co/blog/changing-mapping-with-zero-downtime
Steps to change mapping type by reindexing and alias on a new index (using the kibana tools):
1 - get the mapping of the original index: GET activityidx/_mapping
2 - create a json file with the changed mapping
3 - curl -XPUT localhost:9200/activityidx_v1 -H 'Content-Type: application/json' -d @index-mapping (using curl)
4 reindex to the new original to the new one:
POST _reindex
{
"conflicts": "proceed",
"source": {
"index": "activityidx"
},
"dest": {
"index": "activityidx_v1"
}
}
5 - delete the original: DELETE activityidx
6 - make an alias of activityidx to the new one:
POST _aliases
{
"actions": [
{ "add": {
"alias": "activityidx",
"index": "activityidx_v1"
}}
]
}
# delete kibana settings
curl -XDELETE http://localhost:9200/.kibana
......@@ -18,7 +46,7 @@ curl -XPOST 'http://172.16.1.72:9200/activityidx/activity/_search' -d '{
}'
# delete by query
curl -XPOST 'http://172.16.1.72:9200/activityidx/activity/_delete_by_query' -d '{
curl -XPOST 'http://172.16.1.72:9200/activityidx/activity/_delete_by_query?conflicts=proceed' -d '{
"query": {
"range": {
"published": {
......
version: '2'
services:
otp:
# image: opentripplanner/opentripplanner
# image: municipalitybank.com:5050/mcx/devops/otp
image: goabout/opentripplanner
ports:
- "8081:8080"
- "8082:8081"
volumes:
- /var/otp/graphs:/var/otp/graphs
environment:
JAVA_MX: 8G
# JAVA_ARGS: "-Xms256m -Xmx512m"
# for running
command: otp --autoScan --server
# for building
# command: otp --build /var/otp/graphs/chicago/ --router chicago
# command: otp --build /var/otp/graphs/berlin/ --router berlin
# command: otp --build /var/otp/graphs/san-diego/ --router san-diego
## for recreating graphs: in the city folder place the .pbf file and the gtfs file
# and then start the composer with the buld command (above) for the correct city - router
[
{
"id": "chicago/camera/1-23-1",
"lat": 41.867289,
"lon": -87.626378,
"mediaType": "LIVE",
"name": "1-23-1",
"views": [
{
"id": "chicago/camera/1-23-1",
"liveUrl": "http://166.151.82.90:8000/-wvhttp-01-/GetOneShot?image_size=640x480&frame_count=1000000000"
}
]
},
{
"id": "chicago/camera/1-23-2",
"lat": 41.877975,
"lon": -87.640998,
"mediaType": "LIVE",
"name": "1-23-2",
"views": [
{
"id": "chicago/camera/1-23-2",
"liveUrl": "http://166.250.63.231:8000/-wvhttp-01-/GetOneShot?image_size=640x480&frame_count=1000000000"
}
]
},
{
"id": "chicago/camera/1-23-3",
"lat": 41.850030,
"lon": -87.650050,
"mediaType": "LIVE",
"name": "1-23-3",
"views": [
{
"id": "chicago/camera/1-23-2",
"liveUrl": "http://63.142.32.78:80/mjpg/video.mjpg"
}
]
},
{
"id": "chicago/camera/1-23-4",
"lat": 41.880259,
"lon": -87.686120,
"mediaType": "LIVE",
"name": "1-23-2",
"views": [
{
"id": "chicago/camera/1-23-4",
"liveUrl": "http://131.193.91.50:80/mjpg/video.mjpg"
}
]
}
]
[
{
"id": "chicago/crossWalk/LOCATION-30-233",
"name": "LOCATION-30-233",
"lat": "32.71369303845867",
"lon": "-117.15843803640075",
"count": "R:I:0:20",
"speed": "R:I:0:5",
"timestamp": 0,
"direction": "horizontal",
"box": [
{
"lat": 41.884744,
"lon": -87.627744
},
{
"lat": 41.884744,
"lon": -87.627647
},
{
"lat": 41.884616,
"lon": -87.627647
},
{
"lat": 41.884616,
"lon": -87.627744
}
]
},
{
"id": "chicago/crossWalk/LOCATION-31-233",
"name": "LOCATION-31-233",
"lat": "32.71369303845867",
"lon": "-117.15843803640075",
"count": "R:I:0:20",
"speed": "R:I:0:5",
"timestamp": 0,
"direction": "horizontal",
"box": [
{
"lat": 41.886071,
"lon": -87.628186
},
{
"lat": 41.886071,
"lon": -87.628086
},
{
"lat": 41.885921,
"lon": -87.628086
},
{
"lat": 41.885921,
"lon": -87.628186
}
]
}
]
[
{
"id": "chicago/crossWalk/LOCATION-30-233",
"name": "LOCATION-30-233",
"lat": "32.71369303845867",
"lon": "-117.15843803640075",
"count": "R:I:0:20",
"speed": "R:I:0:5",
"timestamp": 0,
"direction": "horizontal",
"box": [
{
"lat": 41.884744,
"lon": -87.627744
},
{
"lat": 41.884744,
"lon": -87.627647
},
{
"lat": 41.884616,
"lon": -87.627647
},
{
"lat": 41.884616,
"lon": -87.627744
}
]
},
{
"id": "chicago/crossWalk/LOCATION-31-233",
"name": "LOCATION-31-233",
"lat": "32.71369303845867",
"lon": "-117.15843803640075",
"count": "R:I:0:20",
"speed": "R:I:0:5",
"timestamp": 0,
"direction": "horizontal",
"box": [
{
"lat": 41.886071,
"lon": -87.628186
},
{
"lat": 41.886071,
"lon": -87.628086
},
{
"lat": 41.885921,
"lon": -87.628086
},
{
"lat": 41.885921,
"lon": -87.628186
}
]
}
]
[
{
"id": "fremont/camera/ct-cam-pop-S880_at_JCT_84",
"lat": 37.56425000,
"lon": -122.03972222,
"mediaType": "FLASH",
"name": "ct-cam-pop-S880_at_JCT_84",
"views": [
{
"id": "fremont/camera/ct-cam-pop-S880_at_JCT_84",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&amp;autoPlay=true&amp;playButtonOverlay=false&amp;controlBarAutoHide=false&amp;poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&amp;controlBarAutoHide=true&amp;verbose=true&amp;verbose=true&amp;optimizeInitialIndex=false&amp;optimizeBuffering=false&amp;bufferTime=3&amp;playButtonOverlay=false"
}
]
}
]
[
{
"id": "chicago/camera/1-23-1",
"lat": 41.867289,
"lon": -87.626378,
"mediaType": "LIVE",
"name": "1-23-1",
"views": [
{
"id": "chicago/camera/1-23-1",
"liveUrl": "http://166.151.82.90:8000/-wvhttp-01-/GetOneShot?image_size=640x480&frame_count=1000000000"
}
]
},
{
"id": "chicago/camera/1-23-2",
"lat": 41.877975,
"lon": -87.640998,
"mediaType": "LIVE",
"name": "1-23-2",
"views": [
{
"id": "chicago/camera/1-23-2",
"liveUrl": "http://166.250.63.231:8000/-wvhttp-01-/GetOneShot?image_size=640x480&frame_count=1000000000"
}
]
},
{
"id": "chicago/camera/1-23-3",
"lat": 41.850030,
"lon": -87.650050,
"mediaType": "LIVE",
"name": "1-23-3",
"views": [
{
"id": "chicago/camera/1-23-2",
"liveUrl": "http://63.142.32.78:80/mjpg/video.mjpg"
}
]
},
{
"id": "chicago/camera/1-23-4",
"lat": 41.880259,
"lon": -87.686120,
"mediaType": "LIVE",
"name": "1-23-2",
"views": [
{
"id": "chicago/camera/1-23-4",
"liveUrl": "http://131.193.91.50:80/mjpg/video.mjpg"
}
]
}
]
FROM opentripplanner/opentripplanner
#ENTRYPOINT ["sh", "-c", "java" "$JAVA_ARGS" "-Xverify:none" "-jar" "/var/otp/otp.jar"]
COPY start.sh /
RUN chmod +x start.sh
RUN chmod +x /start.sh
ENTRYPOINT ["/start.sh"]
#CMD ["/start.sh"]
version: '2'
services:
otp:
# image: opentripplanner/opentripplanner
# image: municipalitybank.com:5050/mcx/devops/otp
image: goabout/opentripplanner
ports:
- "8081:8080"
- "8082:8081"
volumes:
- /var/otp/graphs:/var/otp/graphs
environment:
JAVA_MX: 8G
# JAVA_ARGS: "-Xms256m -Xmx512m"
# for running
command: otp --autoScan --server
# for building
# command: otp --build /var/otp/graphs/chicago/ --router chicago
# command: otp --build /var/otp/graphs/berlin/ --router berlin
# command: otp --build /var/otp/graphs/san-diego/ --router san-diego
## for recreating graphs: in the city folder place the .pbf file and the gtfs file
# and then start the composer with the buld command (above) for the correct city - router
The file could not be displayed because it is too large.
This diff could not be displayed because it is too large.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment