From 9b4612b37ae85909d0950ad9e6a058ff10880e93 Mon Sep 17 00:00:00 2001 From: Manish R Jain Date: Tue, 14 Mar 2017 22:30:04 +1100 Subject: [PATCH] Apply Apache 2.0 license all over the codebase. --- LICENSE | 25 ------------------------- db/compact.go | 16 ++++++++++++++++ db/compact_test.go | 16 ++++++++++++++++ db/db.go | 16 ++++++++++++++++ db/db_test.go | 16 ++++++++++++++++ db/writebatch.go | 16 ++++++++++++++++ db/writebatch_test.go | 16 ++++++++++++++++ memtable/memtable.go | 16 ++++++++++++++++ memtable/memtable_test.go | 16 ++++++++++++++++ skiplist/skiplist.go | 16 ++++++++++++++++ skiplist/skiplist_test.go | 16 ++++++++++++++++ skl/skl.go | 16 ++++++++++++++++ skl/skl_test.go | 16 ++++++++++++++++ slist/slist.go | 16 ++++++++++++++++ slist/slist_test.go | 16 ++++++++++++++++ table/builder.go | 17 ++++++++++++++++- table/iterator.go | 16 ++++++++++++++++ table/table.go | 16 ++++++++++++++++ table/table_test.go | 16 ++++++++++++++++ value/value.go | 16 ++++++++++++++++ value/value_test.go | 16 ++++++++++++++++ y/arena.go | 16 ++++++++++++++++ y/dbformat.go | 16 ++++++++++++++++ y/error.go | 16 ++++++++++++++++ y/y.go | 16 ++++++++++++++++ 25 files changed, 384 insertions(+), 26 deletions(-) diff --git a/LICENSE b/LICENSE index 8dada3eda..d9a10c0d8 100644 --- a/LICENSE +++ b/LICENSE @@ -174,28 +174,3 @@ of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - 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. diff --git a/db/compact.go b/db/compact.go index f97196e11..620f07380 100644 --- a/db/compact.go +++ b/db/compact.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package db import ( diff --git a/db/compact_test.go b/db/compact_test.go index ca3365c77..b7ee1de95 100644 --- a/db/compact_test.go +++ b/db/compact_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package db import ( diff --git a/db/db.go b/db/db.go index b41c9d967..64e087d58 100644 --- a/db/db.go +++ b/db/db.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package db import ( diff --git a/db/db_test.go b/db/db_test.go index 5ef2410a7..7c31aaa6b 100644 --- a/db/db_test.go +++ b/db/db_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package db import ( diff --git a/db/writebatch.go b/db/writebatch.go index 681ad44a1..40cb854ac 100644 --- a/db/writebatch.go +++ b/db/writebatch.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package db import ( diff --git a/db/writebatch_test.go b/db/writebatch_test.go index 4f20df848..45a74aa77 100644 --- a/db/writebatch_test.go +++ b/db/writebatch_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package db import ( diff --git a/memtable/memtable.go b/memtable/memtable.go index f5d26f384..ea881f43d 100644 --- a/memtable/memtable.go +++ b/memtable/memtable.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package memtable import ( diff --git a/memtable/memtable_test.go b/memtable/memtable_test.go index 9fd1f0c03..6e8fcadb7 100644 --- a/memtable/memtable_test.go +++ b/memtable/memtable_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package memtable import ( diff --git a/skiplist/skiplist.go b/skiplist/skiplist.go index c01177886..3c85214c2 100644 --- a/skiplist/skiplist.go +++ b/skiplist/skiplist.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + // Adapted from https://github.com/facebook/rocksdb/blob/master/db/skiplist.h // Thread safety: // Writes require external synchronization, most likely a mutex. diff --git a/skiplist/skiplist_test.go b/skiplist/skiplist_test.go index 7d2e201ae..35b14b3b7 100644 --- a/skiplist/skiplist_test.go +++ b/skiplist/skiplist_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package skiplist import ( diff --git a/skl/skl.go b/skl/skl.go index 860864afc..f09291047 100644 --- a/skl/skl.go +++ b/skl/skl.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + /* Adapted from RocksDB inline skiplist. diff --git a/skl/skl_test.go b/skl/skl_test.go index 9f5f4b1b1..fc72383a8 100644 --- a/skl/skl_test.go +++ b/skl/skl_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package skl import ( diff --git a/slist/slist.go b/slist/slist.go index 0e407bc1b..ca98197b8 100644 --- a/slist/slist.go +++ b/slist/slist.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package slist /* diff --git a/slist/slist_test.go b/slist/slist_test.go index 89a8d2c16..b66c97998 100644 --- a/slist/slist_test.go +++ b/slist/slist_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package slist import ( diff --git a/table/builder.go b/table/builder.go index eb25e5ec1..e845648df 100644 --- a/table/builder.go +++ b/table/builder.go @@ -1,9 +1,24 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package table import ( "encoding/binary" "math" - // "github.com/dgraph-io/badger/y" ) diff --git a/table/iterator.go b/table/iterator.go index fb7f81ca4..2df8fd6eb 100644 --- a/table/iterator.go +++ b/table/iterator.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package table import ( diff --git a/table/table.go b/table/table.go index 6626c3177..4aa462ba1 100644 --- a/table/table.go +++ b/table/table.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package table import ( diff --git a/table/table_test.go b/table/table_test.go index f7e4f3941..ae3f6ac79 100644 --- a/table/table_test.go +++ b/table/table_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package table import ( diff --git a/value/value.go b/value/value.go index b8b8eddd6..6f492953d 100644 --- a/value/value.go +++ b/value/value.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package value import ( diff --git a/value/value_test.go b/value/value_test.go index cd197738f..8c83c8814 100644 --- a/value/value_test.go +++ b/value/value_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package value import ( diff --git a/y/arena.go b/y/arena.go index f4ffa8aec..f8959bdf1 100644 --- a/y/arena.go +++ b/y/arena.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package y // Very simple arena memory allocation. You can only add stuff. diff --git a/y/dbformat.go b/y/dbformat.go index 6c1df8125..ab4913804 100644 --- a/y/dbformat.go +++ b/y/dbformat.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package y import ( diff --git a/y/error.go b/y/error.go index 6840e425b..0f8517399 100644 --- a/y/error.go +++ b/y/error.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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 2016 Dgraph Labs, Inc. * diff --git a/y/y.go b/y/y.go index 705fbe2fb..b858d47c0 100644 --- a/y/y.go +++ b/y/y.go @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Dgraph Labs, Inc. and 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. + */ + package y var EmptySlice = []byte{}