Permalink
Browse files

apache2 license + headers

git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@3593 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe
  • Loading branch information...
1 parent 6368f16 commit d9a8d6f99862a3bd7af282e5e2501ee0bc6ee03a sears committed Jan 19, 2012
Showing with 1,381 additions and 559 deletions.
  1. +504 −501 .cproject
  2. +14 −0 benchmarks/lsm_microbenchmarks.cpp
  3. +15 −0 benchmarks/tcpclient_noop.cpp
  4. +19 −0 bloomFilter.c
  5. +19 −0 bloomFilter.h
  6. +23 −2 datapage.cpp
  7. +19 −0 datapage.h
  8. +19 −0 datatuple.h
  9. +14 −0 diskTreeComponent.cpp
  10. +14 −0 diskTreeComponent.h
  11. +18 −0 logserver.cpp
  12. +18 −4 logserver.h
  13. +18 −3 logstore.cpp
  14. +18 −2 logstore.h
  15. +20 −10 main/newserver.cpp
  16. +19 −3 main/server.cpp
  17. +18 −0 memTreeComponent.cpp
  18. +18 −0 memTreeComponent.h
  19. +14 −2 mergeManager.cpp
  20. +14 −2 mergeManager.h
  21. +14 −0 mergeStats.cpp
  22. +14 −4 mergeStats.h
  23. +18 −2 merger.cpp
  24. +18 −2 merger.h
  25. +14 −0 network.h
  26. +14 −2 regionAllocator.h
  27. +14 −0 requestDispatch.cpp
  28. +19 −3 sherpa/LSMServerHandler.cc
  29. +17 −0 sherpa/LSMServerHandler.h
  30. +14 −0 simpleServer.cpp
  31. +14 −0 simpleServer.h
  32. +14 −0 tcpclient.cpp
  33. +14 −0 tcpclient.h
  34. +15 −1 test/check_bloomFilter.cpp
  35. +19 −0 test/check_datapage.cpp
  36. +19 −5 test/check_gen.cpp
  37. +19 −3 test/check_logtable.cpp
  38. +19 −1 test/check_logtree.cpp
  39. +19 −0 test/check_merge.cpp
  40. +19 −2 test/check_mergelarge.cpp
  41. +19 −2 test/check_mergetuple.cpp
  42. +19 −3 test/check_rbtree.cpp
  43. +14 −0 test/check_tcpbulkinsert.cpp
  44. +19 −0 test/check_tcpclient.cpp
  45. +14 −0 test/check_testAndSet.cpp
  46. +14 −0 test/check_util.h
  47. +18 −0 tuplemerger.cpp
  48. +18 −0 tuplemerger.h
  49. +14 −0 util/change_log_mode.cpp
  50. +14 −0 util/copy_database.cpp
  51. +14 −0 util/dump_blockmap.cpp
  52. +14 −0 util/histogram.cpp
  53. +14 −0 util/space_usage.cpp
  54. +14 −0 util/util_main.h
View
1,005 .cproject

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,6 +1,20 @@
/*
* lsm_microbenchmarks.cpp
*
+ * Copyright 2011-2012 Yahoo! Inc.
+ *
+ * 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.
+ *
* Created on: Aug 22, 2011
* Author: sears
*/
@@ -1,6 +1,21 @@
/*
* tcpclient_noop.cpp
*
+ *
+ * Copyright 2010-2012 Yahoo! Inc.
+ *
+ * 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.
+ *
* Created on: Feb 23, 2010
* Author: sears
*/
View
@@ -1,3 +1,22 @@
+/*
+ * bloomFilter.c
+ *
+ * Copyright 2010-2012 Yahoo! Inc.
+ *
+ * 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.
+ *
+ * Author: sears
+ */
#include <assert.h>
#include <math.h>
#include <stdio.h>
View
@@ -1,3 +1,22 @@
+/*
+ * bloomFilter.h
+ *
+ * Copyright 2010-2012 Yahoo! Inc.
+ *
+ * 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.
+ *
+ * Author: sears
+ */
#ifndef BLOOM_FILTER_H
#define BLOOM_FILTER_H
View
@@ -1,3 +1,22 @@
+/*
+ * datapage.cpp
+ *
+ * Copyright 2009-2012 Yahoo! Inc.
+ *
+ * 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.
+ *
+ * Author: makdere
+ */
#include "logstore.h"
#include "datapage.h"
#include "regionAllocator.h"
@@ -273,8 +292,10 @@ bool DataPage::append(datatuple const * dat)
// can happen once per giant object.
accept_tuple = false;
} else {
- // ... by a little bit. Accept tuple if it fits on this page.
- accept_tuple = (((write_offset_-1) & ~(PAGE_SIZE-1)) == (((write_offset_ + tup_len)-1) & ~(PAGE_SIZE-1)));
+ // ... by a little bit.
+ accept_tuple = true;
+ //Accept tuple if it fits on this page, or if it's big..
+ //accept_tuple = (((write_offset_-1) & ~(PAGE_SIZE-1)) == (((write_offset_ + tup_len)-1) & ~(PAGE_SIZE-1)));
}
} else {
if(write_offset_ + tup_len < (initial_page_count_ * PAGE_SIZE)) {
View
@@ -1,3 +1,22 @@
+/*
+ * datapage.h
+ *
+ * Copyright 2009-2012 Yahoo! Inc.
+ *
+ * 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.
+ *
+ * Author: makdere
+ */
#ifndef _SIMPLE_DATA_PAGE_H_
#define _SIMPLE_DATA_PAGE_H_
View
@@ -1,3 +1,22 @@
+/*
+ * datatuple.h
+ *
+ * Copyright 2010-2012 Yahoo! Inc.
+ *
+ * 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.
+ *
+ * Author: sears
+ */
#include <network.h>
#ifndef _DATATUPLE_H_
View
@@ -1,6 +1,20 @@
/*
* diskTreeComponent.cpp
*
+ * Copyright 2010-2012 Yahoo! Inc.
+ *
+ * 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.
+ *
* Created on: Feb 18, 2010
* Author: sears
*/
View
@@ -1,6 +1,20 @@
/*
* diskTreeComponent.h
*
+ * Copyright 2010-2012 Yahoo! Inc.
+ *
+ * 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.
+ *
* Created on: Feb 18, 2010
* Author: sears
*/
View
@@ -1,3 +1,21 @@
+/*
+ * diskTreeComponent.cpp
+ *
+ * Copyright 2009-2012 Yahoo! Inc.
+ *
+ * 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.
+ *
+ */
#include <sstream>
#include "logserver.h"
View
@@ -1,3 +1,21 @@
+/*
+ * logserver.h
+ *
+ * Copyright 2009-2012 Yahoo! Inc.
+ *
+ * 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.
+ *
+ */
#ifndef _LOGSERVER_H_
#define _LOGSERVER_H_
@@ -11,10 +29,6 @@
#include "logstore.h"
-#undef begin
-#undef try
-#undef end
-
#define STATS_ENABLED 1
#ifdef STATS_ENABLED
View
@@ -1,3 +1,21 @@
+/*
+ * logstore.cpp
+ *
+ * Copyright 2009-2012 Yahoo! Inc.
+ *
+ * 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.
+ *
+ */
#include "logstore.h"
#include "merger.h"
@@ -9,9 +27,6 @@
#include <stasis/logger/filePool.h>
#include "mergeStats.h"
-#undef try
-#undef end
-
static inline double tv_to_double(struct timeval tv)
{
return static_cast<double>(tv.tv_sec) +
View
@@ -1,9 +1,25 @@
+/*
+ * logstore.h
+ *
+ * Copyright 2009-2012 Yahoo! Inc.
+ *
+ * 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.
+ *
+ */
#ifndef _LOGSTORE_H_
#define _LOGSTORE_H_
#include <stasis/common.h>
-#undef try
-#undef end
#include <vector>
View
@@ -1,8 +1,25 @@
+/*
+ * newserver.cpp
+ *
+ * Copyright 2010-2012 Yahoo! Inc.
+ *
+ * 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.
+ *
+ * Created on: Aug 11, 2010
+ * Author: sears
+ */
#include <stasis/transactional.h>
#include <stasis/logger/safeWrites.h>
-#undef end
-#undef try
-#undef begin
#include <signal.h>
@@ -11,13 +28,6 @@
#include "logstore.h"
#include "simpleServer.h"
-/*
- * newserver.cpp
- *
- * Created on: Aug 11, 2010
- * Author: sears
- */
-
int main(int argc, char *argv[])
{
signal(SIGPIPE, SIG_IGN);
Oops, something went wrong.

0 comments on commit d9a8d6f

Please sign in to comment.