Skip to content

Instantly share code, notes, and snippets.

import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
#!/bin/bash
# Define Solr version
SOLR_VERSION="9.5.0"
SOLR_COLLECTION="testCreateWithDefaultConfigSet"
SOLR_ZK="localhost:14332/solr"
SOLR_DIR="solr-$SOLR_VERSION"
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
import tkinter as tk
import os
import glob
from pathlib import Path
from tkinter import filedialog
from PIL import Image, ImageTk
class ImageManager:
@markrmiller
markrmiller / asf-oauth-example.py
Created October 12, 2021 05:22 — forked from Humbedooh/asf-oauth-example.py
ASF Oauth Examples
#!/usr/bin/env python3
""" ASF OAuth example in Python 3"""
import cgi
import os
import requests
import urllib
import uuid
def init_oauth():
[
{
"jmhVersion" : "1.32",
"benchmark" : "org.apache.lucene.jmh.benchmarks.search.FuzzyQuery2.fuzzySearch",
"mode" : "thrpt",
"threads" : 1,
"forks" : 1,
"jvm" : "/opt/hostedtoolcache/jdk/11.0.12/x64/bin/java",
"jvmArgs" : [
"-Djmh.shutdownTimeout=5",
@markrmiller
markrmiller / scale_current_design.md
Last active October 4, 2021 06:37
How could the current design scale?

How can the current system design be so poor at scale and performance and yet also scale and perform like Ive discussed? Well, a tough part in terms of what I say it can do on little hardware and instances involves an absolute ton of work and changes that would take me lifetimes to push through committee that lets you create and load tons of SolrCores in parallel in 10s of milliseconds time each. But thats mostly relevant to my desire to be able to scale in every direction, collection, shards, replicas, all of that even per instance.

Ill gloss over a thousand things, skip over a thousand more. And I dont claim anything here is best way to go, the way anyone would want to go, the way anyone should go, or really anything other than, its an impl that fits the current design, can be ridiculously fast, can scale ridiculously well. That I know. The other things I dont even really care about much. Im up for a change in scenery actually at this point, but I do have a disagreement on some perceptions about current d

@markrmiller
markrmiller / test.md
Last active October 2, 2021 09:35
test

public DistributedMap(SolrZkClient zookeeper, String dir) { this.dir = dir;

ZkCmdExecutor cmdExecutor = new ZkCmdExecutor(zookeeper.getZkClientTimeout());
try {
  cmdExecutor.ensureExists(dir, zookeeper);
} catch (KeeperException e) {
  throw new SolrException(ErrorCode.SERVER_ERROR, e);
} catch (InterruptedException e) {
  Thread.currentThread().interrupt();