You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2009/03/20 20:49:12 UTC

svn commit: r756731 - /incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLog.java

Author: alakshman
Date: Fri Mar 20 19:49:11 2009
New Revision: 756731

URL: http://svn.apache.org/viewvc?rev=756731&view=rev
Log:
Removed the dependencies for JDK7.

Modified:
    incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLog.java

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLog.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLog.java?rev=756731&r1=756730&r2=756731&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLog.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/CommitLog.java Fri Mar 20 19:49:11 2009
@@ -19,7 +19,6 @@
 package org.apache.cassandra.db;
 
 import java.io.*;
-import java.nio.file.Path;
 import java.util.*;
 
 import org.apache.cassandra.config.CFMetaData;
@@ -628,28 +627,6 @@
     	forcedRollOver_ = true;
     }
 
-    synchronized  public void snapshot( String snapshotDirectory ) throws IOException
-    {
-        Map<String, List<File>> tableToCommitLogs = RecoveryManager.getListOFCommitLogsPerTable();
-        List<File> clogs = tableToCommitLogs.get(table_);
-        
-        if( clogs != null )
-        {
-        	File snapshotDir = new File(snapshotDirectory);
-        	if( !snapshotDir.exists() )
-        		snapshotDir.mkdir();
-        	File commitLogSnapshotDir = new File(snapshotDirectory + System.getProperty("file.separator") + "CommitLogs");
-        	if( !commitLogSnapshotDir.exists() )
-        		commitLogSnapshotDir.mkdir();
-            for (File file : clogs)
-            {
-            	Path existingLink = file.toPath();
-            	File hardLinkFile = new File(commitLogSnapshotDir.getAbsolutePath() + System.getProperty("file.separator") + file.getName());
-            	Path hardLink = hardLinkFile.toPath();
-            	hardLink.createLink(existingLink);
-            }
-        }
-    }
     public static void main(String[] args) throws Throwable
     {
         LogUtil.init();