Skip to content

Instantly share code, notes, and snippets.

View jmazanec15's full-sized avatar

John Mazanec jmazanec15

  • AWS
  • Boston, MA
View GitHub Profile
@jmazanec15
jmazanec15 / main.py
Created June 17, 2021 22:08
Upgrade test
"""
Upgrade tests for KNN
(Use python 3)
python3 main {host (dont include port)} {command}
"""
import sys
from elasticsearch import Elasticsearch, RequestsHttpConnection
@jmazanec15
jmazanec15 / docker-compose.yml
Created June 17, 2021 22:06
Docker compose for OS for restart upgrade
version: '3'
services:
odfe-node1:
image: opensearchproject/opensearch:1.0.0-rc1
container_name: opensearch-node1
environment:
- cluster.name=os-cluster
- node.name=opensearch-node1
- discovery.seed_hosts=opensearch-node1,opensearch-node2,opensearch-node3
- cluster.initial_master_nodes=opensearch-node1,opensearch-node2,opensearch-node3
@jmazanec15
jmazanec15 / docker-compose.yml
Created June 17, 2021 22:05
Docker compose for OS rolling upgrade
version: '3'
services:
opensearch-node1:
image: opensearchproject/opensearch:1.0.0-rc1
container_name: opensearch-node1
environment:
- cluster.name=odfe-cluster
- node.name=opensearch-node1
- discovery.seed_hosts=odfe-node1,odfe-node2,odfe-node3
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
@jmazanec15
jmazanec15 / docker-compose.yml
Created June 17, 2021 22:04
Docker Compose for ODFE 3 Node cluster
version: '3'
services:
odfe-node1:
image: amazon/opendistro-for-elasticsearch:1.13.2
container_name: odfe-node1
environment:
- cluster.name=odfe-cluster
- node.name=odfe-node1
- discovery.seed_hosts=odfe-node1,odfe-node2,odfe-node3
- cluster.initial_master_nodes=odfe-node1,odfe-node2,odfe-node3
"""
Repro attempt for https://discuss.opendistrocommunity.dev/t/reindexing-produces-different-result-on-the-same-query-vector/5564/8
"""
from elasticsearch import Elasticsearch, RequestsHttpConnection, helpers
import math
import random
def get_es():
cmake_minimum_required(VERSION 2.8)
project(KNNIndex_FAISS)
# Corner case. For CMake 2.8, there is no option to specify set(CMAKE_CXX_STANDARD 11). Instead, the flag manually needs
# to be set.
if (CMAKE_VERSION VERSION_LESS "3.1")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
set(CMAKE_CXX_STANDARD 11)