Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ public void runRat() {
matchers.add(subStringMatcher("BSD4 ", "Original BSD License (with advertising clause)", "All advertising materials"));
// Apache
matchers.add(subStringMatcher("AL ", "Apache", "Licensed to Elasticsearch B.V. under one or more contributor"));
// Apache lz4-java
matchers.add(subStringMatcher("ALLZ4", "Apache LZ4-Java", "Copyright 2020 Adrien Grand and the lz4-java contributors"));
// Generated resources
matchers.add(subStringMatcher("GEN ", "Generated", "ANTLR GENERATED CODE"));
// Vendored Code
Expand Down
26 changes: 8 additions & 18 deletions libs/lz4/src/main/java/org/elasticsearch/lz4/ESLZ4Compressor.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
/*
* @notice
*
* Copyright 2020 Adrien Grand and the lz4-java contributors.
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
package org.elasticsearch.lz4;

Expand All @@ -24,8 +13,9 @@
import java.nio.ByteBuffer;
import java.util.Arrays;

/**
* This file is forked from https://github.com/lz4/lz4-java. In particular, it forks the following file
/*
* This file is forked from https://github.com/lz4/lz4-java, which is licensed under Apache-2 and Copyright
* 2020 Adrien Grand and the lz4-java contributors. In particular, it forks the following file
* net.jpountz.lz4.LZ4JavaSafeCompressor.
*
* It modifies the original implementation to use custom LZ4SafeUtils and SafeUtils implementations which
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
/*
* @notice
*
* Copyright 2020 Adrien Grand and the lz4-java contributors.
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
package org.elasticsearch.lz4;

Expand All @@ -23,8 +12,9 @@

import java.nio.ByteBuffer;

/**
* This file is forked from https://github.com/lz4/lz4-java. In particular, it forks the following file
/*
* This file is forked from https://github.com/lz4/lz4-java, which is licensed under Apache-2 and Copyright
* 2020 Adrien Grand and the lz4-java contributors. In particular, it forks the following file
* net.jpountz.lz4.LZ4JavaSafeFastDecompressor.
*
* It modifies the original implementation to use custom LZ4SafeUtils and SafeUtils implementations which
Expand Down
26 changes: 8 additions & 18 deletions libs/lz4/src/main/java/org/elasticsearch/lz4/LZ4Constants.java
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
/*
* @notice
*
* Copyright 2020 Adrien Grand and the lz4-java contributors.
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*
*/

package org.elasticsearch.lz4;

/**
* This file is forked from https://github.com/lz4/lz4-java. In particular, it forks the following file
/*
* This file is forked from https://github.com/lz4/lz4-java, which is licensed under Apache-2 and Copyright
* 2020 Adrien Grand and the lz4-java contributors. In particular, it forks the following file
* net.jpountz.lz4.LZ4Constants.
*
* There are no modifications. It is copied to this package for reuse as the original implementation is
Expand Down
27 changes: 8 additions & 19 deletions libs/lz4/src/main/java/org/elasticsearch/lz4/LZ4SafeUtils.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
/*
* @notice
*
* Copyright 2020 Adrien Grand and the lz4-java contributors.
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

package org.elasticsearch.lz4;

import net.jpountz.lz4.LZ4Exception;
Expand All @@ -31,8 +19,9 @@
import static org.elasticsearch.lz4.LZ4Constants.ML_MASK;
import static org.elasticsearch.lz4.LZ4Constants.RUN_MASK;

/**
* This file is forked from https://github.com/lz4/lz4-java. In particular, it forks the following file
/*
* This file is forked from https://github.com/lz4/lz4-java, which is licensed under Apache-2 and Copyright
* 2020 Adrien Grand and the lz4-java contributors. In particular, it forks the following file
* net.jpountz.lz4.LZ4SafeUtils.
*
* It modifies the original implementation to use Java9 array mismatch method and varhandle performance
Expand Down
27 changes: 8 additions & 19 deletions libs/lz4/src/main/java/org/elasticsearch/lz4/LZ4Utils.java
Original file line number Diff line number Diff line change
@@ -1,31 +1,20 @@
/*
* @notice
*
* Copyright 2020 Adrien Grand and the lz4-java contributors.
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

package org.elasticsearch.lz4;

import static org.elasticsearch.lz4.LZ4Constants.HASH_LOG;
import static org.elasticsearch.lz4.LZ4Constants.HASH_LOG_64K;
import static org.elasticsearch.lz4.LZ4Constants.HASH_LOG_HC;
import static org.elasticsearch.lz4.LZ4Constants.MIN_MATCH;

/**
* This file is forked from https://github.com/lz4/lz4-java. In particular, it forks the following file
/*
* This file is forked from https://github.com/lz4/lz4-java, which is licensed under Apache-2 and Copyright
* 2020 Adrien Grand and the lz4-java contributors. In particular, it forks the following file
* net.jpountz.lz4.LZ4Utils.
*
* There are no modifications. It is copied to this package for reuse as the original implementation is
Expand Down
26 changes: 8 additions & 18 deletions libs/lz4/src/main/java/org/elasticsearch/lz4/SafeUtils.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
/*
* @notice
*
* Copyright 2020 Adrien Grand and the lz4-java contributors.
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

package org.elasticsearch.lz4;

import net.jpountz.util.Utils;
Expand All @@ -24,8 +13,9 @@
import java.lang.invoke.VarHandle;
import java.nio.ByteOrder;

/**
* This file is forked from https://github.com/lz4/lz4-java. In particular, it forks the following file
/*
* This file is forked from https://github.com/lz4/lz4-java, which is licensed under Apache-2 and Copyright
* 2020 Adrien Grand and the lz4-java contributors. In particular, it forks the following file
* net.jpountz.lz4.SafeUtils.
*
* It modifies the original implementation to use Java9 varhandle performance improvements. Comments
Expand Down
21 changes: 0 additions & 21 deletions libs/lz4/src/main/java/org/elasticsearch/lz4/package-info.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
/*
* Copyright 2020 Adrien Grand and the lz4-java contributors.
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Modifications copyright (C) 2021 Elasticsearch B.V.
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

package org.elasticsearch.lz4;

import net.jpountz.lz4.LZ4Compressor;
Expand All @@ -33,8 +22,9 @@
import java.nio.ByteOrder;
import java.util.Arrays;

/**
* This file is forked from https://github.com/lz4/lz4-java. In particular, it forks the following file
/*
* This file is forked from https://github.com/lz4/lz4-java, which is licensed under Apache-2 and Copyright
* 020 Adrien Grand and the lz4-java contributors. In particular, it forks the following file
* net.jpountz.lz4.AbstractLZ4Test.
*
* It modifies the abstract test case to only test byte arrays and byte array backed byte buffers. These are
Expand Down
26 changes: 8 additions & 18 deletions libs/lz4/src/test/java/org/elasticsearch/lz4/ESLZ4Tests.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
/*
* Copyright 2020 Adrien Grand and the lz4-java contributors.
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Modifications copyright (C) 2021 Elasticsearch B.V.
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

package org.elasticsearch.lz4;

import net.jpountz.lz4.LZ4Compressor;
Expand All @@ -29,8 +18,9 @@
import java.nio.ByteBuffer;
import java.util.Arrays;

/**
* This file is forked from https://github.com/lz4/lz4-java. In particular, it forks the following file
/*
* This file is forked from https://github.com/lz4/lz4-java, which is licensed under Apache-2 and Copyright
* 2020 Adrien Grand and the lz4-java contributors. In particular, it forks the following file
* net.jpountz.lz4.LZ4Test.
*
* It modifies the test case to remove unneeded tests (safe decompressor, native libs, etc). Additionally,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
/*
* Copyright 2020 Adrien Grand and the lz4-java contributors.
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

package org.elasticsearch.transport;

import net.jpountz.lz4.LZ4BlockInputStream;
import net.jpountz.lz4.LZ4Compressor;
import net.jpountz.lz4.LZ4FrameOutputStream;
import net.jpountz.util.SafeUtils;

import org.apache.lucene.util.BytesRef;
Expand All @@ -27,8 +16,9 @@
import java.io.IOException;
import java.io.OutputStream;

/**
* This file is forked from https://github.com/lz4/lz4-java. In particular it forks the following file
/*
* This file is forked from https://github.com/lz4/lz4-java, which is licensed under Apache-2 and Copyright
* 2020 Adrien Grand and the lz4-java contributors. In particular, it forks the following file
* net.jpountz.lz4.LZ4BlockOutputStream.
*
* It modifies the original lz4-java code to allow the reuse of local thread local byte arrays. This prevents
Expand Down